public JsonResult InsertDatos(CHECK_LIST chl) { using (DB_CEAEntities db = new DB_CEAEntities()) { var cl = new CHECK_LIST() { id_cliente = chl.id_cliente, id_asesor = chl.id_asesor, codigo_operacion = chl.codigo_operacion, secuencia = chl.secuencia, monto_solicitado = chl.monto_solicitado, tipo_garantia = chl.tipo_garantia, fecha_validacion_checklist = chl.fecha_validacion_checklist, numero_integrantes = chl.numero_integrantes, tipo_check_list = chl.tipo_check_list, status = chl.status }; db.CHECK_LIST.Add(cl); //db..add(cat); db.SaveChanges(); } return(Json("Ok")); }
public ActionResult EliminaCheck(int?id) { DB_CEAEntities db = new DB_CEAEntities(); try { CHECK_LIST check = db.CHECK_LIST.Find(id); db.CHECK_LIST.Remove(check); db.SaveChanges(); } catch (DataException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log. return(Json("Error")); } return(Json("Success")); }