public void UpdateCallPriorityTable() { var IeSMRecords = IeSMDB.SubCategories.ToList(); Console.WriteLine("Checking CallPriority Table"); foreach (var _record in IeSMRecords) { var _id = (int)_record.SubCategoryId; var _description = _record.Description; var _dateModified = _record.DateModified; var _hermesCallPriority = HermesDb.CallPriorities.Find(_id); if (_hermesCallPriority != null) { if (_hermesCallPriority.DateModified.CompareTo(_record.DateModified) != 0) // Returns -1 if the ieSM record is newer { Console.WriteLine("Updating Record : " + _description); _hermesCallPriority.Description = _description; _hermesCallPriority.DateModified = _dateModified; HermesDb.CallPriorities.Update(_hermesCallPriority); } } else { Console.WriteLine("Adding Record : " + _description); var _newHermesCallPriority = new CallPriority(_id, _description, _dateModified); HermesDb.CallPriorities.Add(_newHermesCallPriority); } } Console.WriteLine("Finished Checking CallPriority Table"); }
public CallRecord(Contact contact, string description, DateTime dueDate, CallPriority priority) : this(description, dueDate, priority) { this.Name = contact.FileAs; this.OID = Convert.ToInt32(contact.ItemId.ToString()); this.Contact = contact; }
CallRecord(string description, DateTime dueDate, CallPriority priority) { this.Description = description; this.DueDate = dueDate; this.NotifyDate = dueDate.Date.AddDays(Settings.Default.DefaultReminderDay).AddMinutes(Settings.Default.DefaultReminderTime); this.Priority = priority; this.Notes = string.Empty; this.IsActive = true; this.WasNotified = !Settings.Default.RemindersEnabled; }
public PriorityClientBase(CallPriority priority, Binding binding, EndpointAddress remoteAddress) : base(priority, binding, remoteAddress) { }
public PriorityClientBase(CallPriority priority, string endpointConfigurationName, EndpointAddress remoteAddress) : base(priority, endpointConfigurationName, remoteAddress) { }
public PriorityClientBase(CallPriority priority, string endpointConfigurationName) : base(priority, endpointConfigurationName) { }
public PriorityClientBase(CallPriority priority) : base(priority) { }
public void UpdateCallTable() { var IeSMRecords = IeSMDB.LoggedCalls.Where(call => call.CallClosed == 0 && call.AssignedTo != null && call.SubCategoryId != null).ToList(); var HermesRecords = new List <Call>(); Console.WriteLine("Checking Call Table"); foreach (var _record in IeSMRecords) { var _id = (int)_record.CallNo; var _LoggedBy = HermesDb.Users.Find((int)_record.LoggedBy); //var _ClosedBy = HermesDb.Users.Find((int)_record.ClosedBy); User _AssignedTo = HermesDb.Users.Find((int)_record.AssignedTo); var _DateLogged = _record.DateLogged; //var _DateClosed = (DateTime)_record.DateClosed; int _CallDuration; if (_record.CallDuration != null) { _CallDuration = (int)_record.CallDuration; } else { _CallDuration = 0; } int _TotalDuration; if (_record.TotalDuration != null) { _TotalDuration = (int)_record.CallDuration; } else { _TotalDuration = 0; } Customer _Customer = HermesDb.Customers.Find((int)_record.CustNo); var _Contact = _record.ContactName; var _CallDescription = _record.CallDescription; var _Problem = _record.Problem; var _Solution = _record.Solution; var _CallClosed = (int)_record.CallClosed; CallPriority _Priority = HermesDb.CallPriorities.Find((int)_record.SubCategoryId); CallCategory _CallCategory = HermesDb.CallCategories.Find((int)_record.CallCategory); CallStatus _Status = HermesDb.CallStatus.Find((int)_record.StatusNo); var _DateModified = (DateTime)_record.DateModified; User _UserModified = HermesDb.Users.Find((int)_record.UserModified); var _Resolved = (int)_record.PriorityNo; var _hermesCall = HermesDb.Calls.Find(_id); if (_hermesCall != null) { if (_hermesCall.DateModified.CompareTo(_record.DateModified) != 0) // Returns -1 if the ieSM record is newer { Console.WriteLine("Updating Record Call No: " + _id); _hermesCall.LoggedBy = _LoggedBy; //_hermesCall.ClosedBy = _ClosedBy; _hermesCall.AssignedTo = _AssignedTo; _hermesCall.DateLogged = _DateLogged; //_hermesCall.DateClosed = _DateClosed; _hermesCall.CallDuration = _CallDuration; _hermesCall.TotalDuration = _TotalDuration; _hermesCall.Customer = _Customer; _hermesCall.Contact = _Contact; _hermesCall.CallDescription = _CallDescription; _hermesCall.Problem = _Problem; _hermesCall.Solution = _Solution; _hermesCall.CallClosed = _CallClosed; _hermesCall.Priority = _Priority; _hermesCall.CallCategory = _CallCategory; _hermesCall.Status = _Status; _hermesCall.DateModified = _DateModified; _hermesCall.UserModified = _UserModified; _hermesCall.Resolved = _Resolved; } } else { Console.WriteLine("Adding Record : " + _id); var _newHermesCall = new Call(_id, _LoggedBy, /*_ClosedBy,*/ _AssignedTo, _DateLogged, /*_DateClosed,*/ _CallDuration, _TotalDuration, _Customer, _Contact, _CallDescription, _Problem, _Solution, _CallClosed, _Priority, _CallCategory, _Status, _DateModified, _UserModified, _Resolved); HermesDb.Calls.Add(_newHermesCall); } } Console.WriteLine("Finished Checking Call Table"); }