Esempio n. 1
0
 public static void SaveCorrespondence(crmCorrespondenceView SelectedCorrespondence)
 {
     correspondence cat = CrmData.GetCorrespondence(SelectedCorrespondence.Id);
     cat.correspondence_name = SelectedCorrespondence.Name;
     cat.code = SelectedCorrespondence.code;
     cat.description = SelectedCorrespondence.description;
     cat.category_id = SelectedCorrespondence.category_id;
     cat.modified_by = AppData.CurrentUser.id;
     cat.updated_at = DateTime.Now;
     Database.CRM.SubmitChanges();
 }
Esempio n. 2
0
 public static void AddCorrespondence(crmCorrespondenceView SelectedCorrespondence)
 {
     correspondence newCat = new correspondence();
     newCat.correspondence_name = SelectedCorrespondence.Name;
     newCat.code = SelectedCorrespondence.code;
     newCat.description = SelectedCorrespondence.description;
     newCat.category_id = SelectedCorrespondence.category_id;
     newCat.owner = AppData.CurrentUser.id;
     newCat.created_at = DateTime.Now;
     Database.CRM.correspondences.InsertOnSubmit(newCat);
     Database.CRM.SubmitChanges();
 }