Exemplo n.º 1
0
 public static void SaveSubCorrespondence(crmSubCorrespondenceView SelectedSubCorrespondence)
 {
     sub_correspondence cat = CrmData.GetSubCorrespondence(SelectedSubCorrespondence.Id);
     cat.sub_correspondence_name = SelectedSubCorrespondence.Name;
     cat.code = SelectedSubCorrespondence.code;
     cat.description = SelectedSubCorrespondence.description;
     cat.correspondence_id = SelectedSubCorrespondence.correspondence_id;
     cat.sla_id = SelectedSubCorrespondence.sla_id;
     cat.status = SelectedSubCorrespondence.active;
     cat.modified_by = AppData.CurrentUser.id;
     cat.updated_at = DateTime.Now;
     Database.CRM.SubmitChanges();
 }
Exemplo n.º 2
0
 public static void AddSubCorrespondence(crmSubCorrespondenceView SelectedSubCorrespondence)
 {
     sub_correspondence newCat = new sub_correspondence();
     newCat.sub_correspondence_name = SelectedSubCorrespondence.Name;
     newCat.code = SelectedSubCorrespondence.code;
     newCat.description = SelectedSubCorrespondence.description;
     newCat.correspondence_id = SelectedSubCorrespondence.correspondence_id;
     newCat.sla_id = SelectedSubCorrespondence.sla_id;
     newCat.status = (bool)SelectedSubCorrespondence.active;
     newCat.owner = AppData.CurrentUser.id;
     newCat.created_at = DateTime.Now;
     Database.CRM.sub_correspondences.InsertOnSubmit(newCat);
     Database.CRM.SubmitChanges();
 }