Пример #1
0
 public string GetCustomerDetailsByIDForMobile(Customer cust)
 {
     try
     {
         if (cust == null)
         {
             throw new Exception(messages.NoItems);
         }
         CustomerViewModel customerObj = Mapper.Map <Customer, CustomerViewModel>(_customerBusiness.GetCustomerDetailsForMobile(cust.ID != null && cust.ID.ToString() != "" ? Guid.Parse(cust.ID.ToString()) : Guid.Empty));
         return(JsonConvert.SerializeObject(new { Result = true, Records = customerObj }));
     }
     catch (Exception ex)
     {
         return(JsonConvert.SerializeObject(new { Result = false, Message = ex.Message }));
     }
 }