Exemple #1
0
 public ActionResult Edit(WARN_COMPLAIN_DETAIL model)
 {
     try
     {
         var data = WarncomplaindetailDao.GetEntity("SEQ", model.SEQ);
         data.COMPLAIN_METHOD = model.COMPLAIN_METHOD;
         data.COMPLAIN_REASON = model.COMPLAIN_REASON;
         data.INPUT_USER      = UserState.UserID;
         data.INPUT_TIME      = DateTime.Now;
         data.STATE           = 2;//默认状态为已处理
         var rst = WarncomplaindetailDao.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 Detail(int id)
        {
            var data     = WarncomplaindetailDao.GetEntity("SEQ", id);
            var hallname = Halldao.GetEntity("HALL_NO", data.HALL_NO).HALL_NAM;
            var name     = nsrdao.GetEntity("NSR_SBM", data.NSR_SBM).NSR_NAME;

            ViewBag.HallName  = hallname;
            ViewBag.NSRName   = name;
            ViewBag.StaffName = "";
            if (!string.IsNullOrEmpty(data.STAFF_ID))
            {
                ViewBag.StaffName = Staffdao.GetEntity("STAFF_ID", data.STAFF_ID).STAFF_NAM;
            }
            return(View(data));
        }
Exemple #3
0
        public ActionResult Edit(int id)
        {
            var data     = WarncomplaindetailDao.GetEntity("SEQ", id);
            var hallname = Halldao.GetEntity("HALL_NO", data.HALL_NO).HALL_NAM;
            var name     = nsrdao.GetEntity("NSR_SBM", data.NSR_SBM).NSR_NAME;

            ViewBag.HallName  = hallname;
            ViewBag.NSRName   = name;
            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_COMPLAIN_DETAIL.DETAIL_STATUS_ENUM), false);
            return(View(data));
        }
Exemple #4
0
 public ActionResult Delete(string id)
 {
     try
     {
         var arrid = id.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         foreach (var _id in arrid)
         {
             // WarncomplaindetailDao.Delete("SEQ", int.Parse(_id.Split('-')[0]));
             var data = WarncomplaindetailDao.GetEntity("SEQ", _id);
             data.STATE      = 3;
             data.INPUT_USER = UserState.UserID;
             data.INPUT_TIME = DateTime.Now;
             var rst = WarncomplaindetailDao.UpdateObject(data);
         }
         Alter("撤销成功!", util.Enum.AlterTypeEnum.Success, false, true);
         return(RedirectToAction("/"));
     }
     catch (Exception ex)
     {
         LogHelper.ErrorLog("删除出错", ex);
         return(Redirect("/Home/Error"));
     }
 }