コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
        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));
        }