コード例 #1
0
        public Boolean Edit(ExaminationTaskTemplate model)
        {
            try
            {
                olsEni.Entry(model).State = EntityState.Modified;
                olsEni.SaveChanges();

                return(true);
            }
            catch (Exception ex)
            {
                StaticHelper.RecordSystemLog(ex);
                return(false);
            }
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
            }
        }