public ActionResult MLBNormalInsert([FromBody] CRUDModel <NetCorePSAV.Models.PSAVCrud.MotivosLBModel> value) { NetCorePSAV.Models.PSAVCrud.MotivosLBModel val = value.Value; val.ID = QueryCrud.UpdateMLB(0, value.Value); MLBList.Insert(MLBList.Count, val); return(Json(MLBList)); }
public ActionResult MLBNormalDelete([FromBody] CRUDModel <NetCorePSAV.Models.PSAVCrud.MotivosLBModel> value) { NetCorePSAV.Models.PSAVCrud.MotivosLBModel val = new NetCorePSAV.Models.PSAVCrud.MotivosLBModel(); val.ID = value.Key.ToString(); QueryCrud.UpdateMLB(2, val); MLBList.Remove(MLBList.Where(or => or.ID == value.Key.ToString()).FirstOrDefault()); return(Json(value)); }
public ActionResult MLBNormalUpdate([FromBody] CRUDModel <NetCorePSAV.Models.PSAVCrud.MotivosLBModel> myObject) { var ord = myObject.Value; NetCorePSAV.Models.PSAVCrud.MotivosLBModel val = MLBList.Where(or => or.ID == ord.ID).FirstOrDefault(); val.ID = ord.ID; val.Nombre = ord.Nombre; QueryCrud.UpdateMLB(1, val); return(Json(myObject.Value)); }