SHARE
TWEET

Untitled

a guest Feb 19th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Tel_CallHistory CallHistory = new Tel_CallHistory();
  2.  
  3.  
  4.                      CallHistory.MobileNo = MobileNo;
  5.                      CallHistory.CRId = CallResponse;
  6.                      CallHistory.CallRemark = CallRemark;
  7.                      CallHistory.UserId = UserId;
  8.                      CallHistory.CallDate = DateTime.Now;
  9.                      CallHistory.CallTime = DateTime.Now.TimeOfDay;
  10.  
  11.                      CallHistory.MeetingPoint = meetingpoint;
  12.                      if (CallResponse == 1)
  13.                      {
  14.                          CallHistory.NCallDateOn = null;
  15.                          CallHistory.NCallTimeAt = null;
  16.                          CallHistory.MeetingDate = Convert.ToDateTime( meetingdate);
  17.  
  18.                          CallHistory.MeetingTime =  DateTime.Parse(meetingtime).TimeOfDay;
  19.                      }
  20.                      else
  21.                      {
  22.  
  23.                          CallHistory.NCallDateOn =  Convert.ToDateTime(NCallDateOn);
  24.  
  25.                          CallHistory.NCallTimeAt =  DateTime.Parse(NCallTimeAt).TimeOfDay;  
  26.  
  27.                          CallHistory.MeetingDate = null;
  28.                          CallHistory.MeetingTime = null;
  29.                      }
  30.  
  31.  
  32.                      db.Tel_CallHistory.AddObject(CallHistory);
  33.  
  34.  
  35.                      Tel_Mobile TelMobile = _teacher.getDB().Tel_Mobile.Single(a => a.MobileNo == MobileNo);
  36.                      TelMobile.CallDate = CallHistory.NCallDateOn;
  37.                      TelMobile.CallTime = CallHistory.NCallTimeAt;
  38.  
  39.                      TelMobile.LCallDateOn = CallHistory.CallDate;
  40.                      TelMobile.LCallTimeAt = CallHistory.CallTime;
  41.                      TelMobile.LCRId = CallHistory.CRId;
  42.                      TelMobile.LCallRemark = CallHistory.CallRemark;
  43.                      TelMobile.LMeetingPoint = CallHistory.MeetingPoint;
  44.                      TelMobile.LMeetingDate = CallHistory.MeetingDate;
  45.                      TelMobile.LMeetingTime = CallHistory.MeetingTime;
  46.  
  47.                       db.Tel_Mobile.ApplyOriginalValues(TelMobile);
  48.  
  49.  
  50.                      db.SaveChanges();
  51.  
  52.  
  53.  
  54.                      db.AcceptAllChanges();
  55.    
  56. db.Tel_Mobile.Attach(TelMobile);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top