示例#1
0
        public ActionResult Edit(int id)
        {
            TemplateSubjectSummaryInfo info = TemplateSubjectSummaryBLL.GetList(p => p.ID == id).FirstOrDefault();

            ViewBag.listSort = Common.GetListOrderID();
            return(View(info));
        }
示例#2
0
        public ActionResult Create(int TemplateID)
        {
            TemplateSubjectSummaryInfo info = new TemplateSubjectSummaryInfo();

            info.TemplateID  = TemplateID;
            ViewBag.listSort = Common.GetListOrderID();
            return(View(info));
        }
示例#3
0
        public ActionResult Create(TemplateSubjectSummaryInfo info)
        {
            if (string.IsNullOrEmpty(info.KeyName))
            {
                return(Json(new APIJson(0, "请填写名称")));
            }

            if (TemplateSubjectSummaryBLL.Create(info).ID > 0)
            {
                return(Json(new APIJson(0, "提交成功", new { info.ID })));
            }
            return(Json(new APIJson(-1, "提交失败,请重试")));
        }
示例#4
0
        public ActionResult Edit(TemplateSubjectSummaryInfo info)
        {
            TemplateSubjectSummaryInfo infoExist = TemplateSubjectSummaryBLL.GetList(p => p.ID == info.ID).FirstOrDefault();

            if (string.IsNullOrEmpty(info.KeyName))
            {
                return(Json("请填写名称"));
            }

            infoExist.KeyName = info.KeyName;
            infoExist.SortID  = info.SortID;
            infoExist.Enable  = info.Enable;

            if (TemplateSubjectSummaryBLL.Edit(infoExist))
            {
                return(Json(new APIJson(0, "提交成功")));
            }
            return(Json(new APIJson(-1, "提交失败,请重试")));
        }
示例#5
0
        public ActionResult Detail(int id)
        {
            TemplateSubjectSummaryInfo info = TemplateSubjectSummaryBLL.GetList(p => p.ID == id).FirstOrDefault();

            return(View(info));
        }