public ActionResult Create([Bind(Include = "IdCheck,Name,Description,Active")] Check check) { if (ModelState.IsValid) { db.Check.Add(check); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(check)); }
public ActionResult Create([Bind(Include = "IdType,Name,Description,Active")] Data.Type type) { if (ModelState.IsValid) { db.Type.Add(type); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(type)); }
public ActionResult Create([Bind(Include = "IdDocument,Name,Description,Active")] Document document) { if (ModelState.IsValid) { db.Document.Add(document); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(document)); }
public ActionResult Create([Bind(Include = "IdTypeProcess,Name,Descriptionq,Active,UseType")] TypeProcess typeProcess) { if (ModelState.IsValid) { db.TypeProcess.Add(typeProcess); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeProcess)); }
public ActionResult Create([Bind(Include = "IdProject,CodProject,NameProject,IdRepresent,DateCreate,UseProject,Active,Avance")] Project project) { if (ModelState.IsValid) { db.Project.Add(project); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdRepresent = new SelectList(db.Directory, "IdDirectory", "Acronym", project.IdRepresent); return(View(project)); }
public ActionResult Create([Bind(Include = "IdCheckProcess,IdExpendient,IdCheckType,Complete,Active")] CheckProcess checkProcess) { if (ModelState.IsValid) { db.CheckProcess.Add(checkProcess); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCheckType = new SelectList(db.CheckType, "IdCheckType", "IdCheckType", checkProcess.IdCheckType); ViewBag.IdExpendient = new SelectList(db.Expedient, "IdExpendient", "FileExpendient", checkProcess.IdExpendient); return(View(checkProcess)); }
public ActionResult Create([Bind(Include = "IdCheckType,IdTypeProcess,IdChecck,Active")] CheckType checkType) { if (ModelState.IsValid) { db.CheckType.Add(checkType); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdChecck = new SelectList(db.Check, "IdCheck", "Name", checkType.IdChecck); ViewBag.IdTypeProcess = new SelectList(db.TypeProcess, "IdTypeProcess", "Name", checkType.IdTypeProcess); return(View(checkType)); }
public ActionResult Create([Bind(Include = "IdExpendient,IdProject,FileExpendient,Predial,NameDemandant,IdTypeProcess,Settled,Court,Magistrate,Resposible,Amount,appraise,DateCreate,Advance,Active")] Expedient expedient) { if (ModelState.IsValid) { db.Expedient.Add(expedient); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdProject = new SelectList(db.Project, "IdProject", "CodProject", expedient.IdProject); ViewBag.IdTypeProcess = new SelectList(db.TypeProcess, "IdTypeProcess", "Name", expedient.IdTypeProcess); return(View(expedient)); }
public ActionResult Create([Bind(Include = "IdDocumentProcess,IdDocumentCheck,IdExpedient,IdState,IdType,Requiered,Active")] DocumentProcess documentProcess) { if (ModelState.IsValid) { db.DocumentProcess.Add(documentProcess); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdDocumentCheck = new SelectList(db.DocumentCheck, "IdDocumentCheck", "IdDocumentCheck", documentProcess.IdDocumentCheck); ViewBag.IdExpedient = new SelectList(db.Expedient, "IdExpendient", "FileExpendient", documentProcess.IdExpedient); return(View(documentProcess)); }
public ActionResult Create([Bind(Include = "IdDocumentCheck,IdDocument,IdCheckType,IdState,IdType,Requiered,Active")] DocumentCheck documentCheck) { if (ModelState.IsValid) { db.DocumentCheck.Add(documentCheck); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCheckType = new SelectList(db.CheckType, "IdCheckType", "IdCheckType", documentCheck.IdCheckType); ViewBag.IdDocument = new SelectList(db.Document, "IdDocument", "Name", documentCheck.IdDocument); ViewBag.IdState = new SelectList(db.State, "IdState", "Name", documentCheck.IdState); ViewBag.IdType = new SelectList(db.Type, "IdType", "Name", documentCheck.IdType); return(View(documentCheck)); }
public int createProject(ProjectMetadata objProject) { try { Project objProjectEnt = new Project(); int result = 0; using (GDEntities db = new GDEntities()) { objProjectEnt = ConvertM(objProject); using (var context = db.Database.BeginTransaction()) { db.Project.Add(objProjectEnt); db.SaveChanges(); context.Commit(); result = objProjectEnt.IdProject; } } return 1; } catch (Exception) { throw; } }