Esempio n. 1
0
 public object AddClient([FromBody] Client client)
 {
     if (ClientBLL.CheckIsDuplicate(Guid.Empty, client.ClientIdentity))
     {
         return(new { Success = false, Duplicated = true });
     }
     ClientBLL.CreateClient(client);
     return(new { Success = true });
 }
Esempio n. 2
0
 public object UpdateClient([FromBody] Client client)
 {
     try
     {
         if (ClientBLL.CheckIsDuplicate(client.ID, client.ClientIdentity))
         {
             return(new { Success = false, Duplicated = true });
         }
         ClientBLL.UpdateClient(client);
         return(new { Success = true });
     }
     catch (Exception ex)
     {
         LogHelper.SystemError("client - " + JsonConvert.SerializeObject(client), ex);
         return(ex.ToString());
     }
 }