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

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