public static Boolean DeleteConfig(Commons.FileInfoConfig model) { using (IndexEntities db = new IndexEntities()) { db.spd_FileInfoConfig(model.Id); } return(true); }
public static Boolean UpdateConfig(Commons.FileInfoConfig model) { using (IndexEntities db = new IndexEntities()) { Boolean?IsSubstrac = (model.Addition == true) ? ((model.Substraction == true) ? true : false) : true; db.spu_FileInfoConfig(model.Id, model.IdFileInfo, model.IdFileInfoType, model.IdAccount, model.UseAttached, IsSubstrac, model.UseRawMaterial, model.Transmissible, model.UseExpired, model.Active, model.RegisterUser); } return(true); }
public HttpResponseMessage DeleteConfig(Commons.FileInfoConfig model) { HttpResponseMessage respuesta = null; try { Boolean result = Dal.FileInfo.DeleteConfig(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); }