Пример #1
0
        public ActionResult Edit(SatisRtConModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var item = dao.GetEntity("ORG_ID", model.ORG_ID);
                    item.COMMON_SCORE       = model.COMMON_SCORE;
                    item.NON_EVAL_SCORE     = model.NON_EVAL_SCORE;
                    item.SATISFY_SCORE      = model.SATISFY_SCORE;
                    item.UNSATISFY_SCORE    = model.UNSATISFY_SCORE;
                    item.VERY_SATISFY_SCORE = model.VERY_SATISFY_SCORE;

                    var rst = dao.UpdateObject(item);
                    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"));
            }
        }
Пример #2
0
        public ActionResult Details(string id)
        {
            try
            {
                var item  = CHK_SATIS_RT_CON_DAL.Get(id);
                var model = new SatisRtConModel()
                {
                    ORG_ID             = item.ORG_ID,
                    ORG_NAM            = item.ORG_NAM,
                    COMMON_SCORE       = item.COMMON_SCORE,
                    NON_EVAL_SCORE     = item.NON_EVAL_SCORE,
                    SATISFY_SCORE      = item.SATISFY_SCORE,
                    UNSATISFY_SCORE    = item.UNSATISFY_SCORE,
                    VERY_SATISFY_SCORE = item.VERY_SATISFY_SCORE
                };

                return(View(model));
            }
            catch (Exception ex)
            {
                LogHelper.ErrorLog("查看出错", ex);
                return(RedirectToAction("Error", "Home"));
            }
        }