public Boolean Edit(ExaminationTaskTemplate model) { try { olsEni.Entry(model).State = EntityState.Modified; olsEni.SaveChanges(); return(true); } catch (Exception ex) { StaticHelper.RecordSystemLog(ex); return(false); } }
public ActionResult Create(ExaminationTaskTemplate m) { if (ModelState.IsValid) { if (um.Create(m)) { return(Redirect("/Contents/html/parent_reload.htm")); } } ViewBag.DepartmentsAndUsers = new UDepartment().GetZTreeJsonWithUsers(); ViewBag.QuestionClassifies = new UQuestionClassify().GetZTreeJson(Status.Available); return(View(m)); }
public Boolean Create(ExaminationTaskTemplate model) { try { Int32 id; id = GetETTId(); model.ETT_Id = id; olsEni.ExaminationTaskTemplates.Add(model); olsEni.SaveChanges(); return(true); } catch (Exception ex) { StaticHelper.RecordSystemLog(ex); return(false); } }