Пример #1
0
        public ActionResult Create(CHK_HALL_CHKITEM_CON_VIEW info)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    ModelState.AddModelError("", "新增出错。");
                    return(View(info));
                }
                var temp = new CHK_HALL_CHKITEM_CON();
                temp.CHKITEM_TYP      = info.CHKITEM_TYP;
                temp.HALL_CHKITEM_CD  = info.HALL_CHKITEM_CD;
                temp.HALL_CHKITEM_NAM = info.HALL_CHKITEM_NAM;
                temp.MODIFY_DTIME     = DateTime.Now;
                temp.MODIFY_ID        = UserState.UserID;
                HallchkitemconDao.AddObject(temp);

                Alter("新增成功!", util.Enum.AlterTypeEnum.Success, false, true);
                return(Redirect("/Home/Blank"));
            }
            catch (Exception ex)
            {
                LogHelper.ErrorLog("系统错误", ex);
                ModelState.AddModelError("", "系统错误!");
                return(Redirect("/Home/Error"));
            }
        }
Пример #2
0
        public ActionResult Create()
        {
            var temp = new CHK_HALL_CHKITEM_CON_VIEW();

            temp.MODIFY_DTIME   = DateTime.Now;
            temp.MODIFY_ID      = UserState.UserID;
            ViewBag.CHKITEM_TYP = EnumHelper.GetCategorySelectList(typeof(gzsw.model.ext.CHK_HALL_CHKITEM_CON.CHKITEM_TYP), false);
            return(View(temp));
        }