Exemple #1
0
 public ActionResult Edit(WARN_ALARM_INFO_DETAIL model)
 {
     ViewBag.STATE = EnumHelper.GetCategorySelectList(typeof(gzsw.model.ext.WARN_ALARM_INFO_DETAIL.ALARM_TYP_ENUM));
     try
     {
         var data = WarnalarminfodetailDao.GetEntity("ALARM_SEQ", model.ALARM_SEQ);
         data.ALARM_REASON = model.ALARM_REASON;
         data.ALARM_METHOD = model.ALARM_METHOD;
         data.STATE        = 2; //默认为已处理
         var rst = WarnalarminfodetailDao.UpdateObject(data);
         if (rst > 0)
         {
             Alter("修改成功!", util.Enum.AlterTypeEnum.Success, false, true);
             return(Redirect("/Home/Blank"));
         }
         ModelState.AddModelError("", "修改失败。");
         return(View(model));
     }
     catch (Exception ex)
     {
         LogHelper.ErrorLog("修改出错!", ex);
         ModelState.AddModelError("", "修改失败!" + ex.Message);
         return(RedirectToAction("Error", "Home"));
     }
 }
Exemple #2
0
        public ActionResult List(int id, string name, int pageIndex = 1, int pageSize = 10)
        {
            var data = WarnalarminfodetailDao.GetEntity("ALARM_SEQ", id);

            ViewBag.SENDINFO_DETAIL_ID = id;
            //ViewBag.HALL_NO = data.HALL_NO;
            ViewBag.Name = name;
            var listdate = new WARN_ALARM_INFO_DETAIL_DAL().GetSendInfoList(name, pageIndex, pageSize);

            return(View(listdate));
        }
Exemple #3
0
        public ActionResult Details(int id)
        {
            var data     = WarnalarminfodetailDao.GetEntity("ALARM_SEQ", id);
            var hallname = Halldao.GetEntity("HALL_NO", data.HALL_NO).HALL_NAM;

            ViewBag.HallName  = hallname;
            ViewBag.StaffName = "";
            if (!string.IsNullOrEmpty(data.STAFF_ID))
            {
                ViewBag.StaffName = Staffdao.GetEntity("STAFF_ID", data.STAFF_ID).STAFF_NAM;
            }
            return(View(data));
        }
Exemple #4
0
        public ActionResult Edit(int id)
        {
            var data     = WarnalarminfodetailDao.GetEntity("ALARM_SEQ", id);
            var hallname = Halldao.GetEntity("HALL_NO", data.HALL_NO).HALL_NAM;

            ViewBag.HallName  = hallname;
            ViewBag.StaffName = "";
            if (!string.IsNullOrEmpty(data.STAFF_ID))
            {
                ViewBag.StaffName = Staffdao.GetEntity("STAFF_ID", data.STAFF_ID).STAFF_NAM;
            }
            ViewBag.STATE = EnumHelper.GetCategorySelectList(typeof(gzsw.model.ext.WARN_ALARM_INFO_DETAIL.DETAIL_STATUS_ENUM), false);
            return(View(data));
        }