Beispiel #1
0
 public ActionResult OrganizationContact(OrganizationContact _Contact)
 {
     _Contact.Phone = _Contact.Phone.Replace("(", String.Empty).Replace(")", String.Empty).Replace(" ", String.Empty).Replace("-", String.Empty);
     if (_Contact.Fax != null)
     {
         _Contact.Fax = _Contact.Fax.Replace("(", String.Empty).Replace(")", String.Empty).Replace(" ", String.Empty).Replace("-", String.Empty);
     }
     else
     {
         _Contact.Fax = null;
     }
     if (_Contact.EncryptedOrganizationContactID == null)
     {
         _Contact.OrganizationID        = HCRGCLIENT.OrganizationID;
         _Contact.OrganizationContactID = _clientService.AddOrganizationContact(Mapper.Map <NEPService.ClientService.OrganizationContact>(_Contact));
         return(Json(GlobalConst.Message.AddSucessfully, GlobalConst.Message.text_html));
     }
     else
     {
         _Contact.OrganizationContactID = Convert.ToInt32(DecryptString(_Contact.EncryptedOrganizationContactID));
         _Contact.OrganizationContactID = _clientService.UpdateOrganizationContact(Mapper.Map <NEPService.ClientService.OrganizationContact>(_Contact));
         return(Json(GlobalConst.Message.UpdateSucessfully, GlobalConst.Message.text_html));
     }
 }