Esempio n. 1
0
 public ActionResult TENormalInsert([FromBody] CRUDModel <NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel> value)
 {
     NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel val = value.Value;
     val.ID = QueryCrud.UpdateSA(0, value.Value);
     SAList.Insert(SAList.Count, val);
     return(Json(TEList));
 }
Esempio n. 2
0
 public ActionResult TENormalDelete([FromBody] CRUDModel <NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel> value)
 {
     NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel val = new NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel();
     val.ID = value.Key.ToString();
     QueryCrud.UpdateSA(2, val);
     SAList.Remove(SAList.Where(or => or.ID == value.Key.ToString()).FirstOrDefault());
     return(Json(value));
 }
Esempio n. 3
0
        public ActionResult TENormalUpdate([FromBody] CRUDModel <NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel> myObject)
        {
            var ord = myObject.Value;

            NetCorePSAV.Models.PSAVCrud.ServiciosAdicionalesModel val = SAList.Where(or => or.ID == ord.ID).FirstOrDefault();
            val.ID = ord.ID; val.Nombre = ord.Nombre;
            QueryCrud.UpdateSA(1, val);
            return(Json(myObject.Value));
        }