public static Boolean AddCustomerUser(Commons.CustomerUser model) { using (IndexEntities db = new IndexEntities()) { db.spi_CustomerUser(model.IdCustomer, model.UserName, model.RegisterUser); } return(true); }
public static Boolean DeleteCustomerUser(Commons.CustomerUser model) { using (IndexEntities db = new IndexEntities()) { db.spd_CustomerUser2(model.IdCustomer, model.UserName); } return(true); }
public HttpResponseMessage DeleteCustomerUser(Commons.CustomerUser model) { HttpResponseMessage respuesta = null; try { Boolean result = Dal.Customer.DeleteCustomerUser(model); respuesta = Request.CreateResponse(HttpStatusCode.OK, result); } catch (Exception ex) { respuesta = Request.CreateErrorResponse(HttpStatusCode.Conflict, (ex.InnerException == null) ? ex.Message : ex.InnerException.Message); } return(respuesta); }