Пример #1
0
        public ActionResult SaveMeasure(DangerTemplateEntity model)
        {
            DepartmentBLL deptBll = new DepartmentBLL();
            Operator      user    = OperatorProvider.Provider.Current();
            var           dept    = deptBll.GetEntity(user.DeptId);

            if (dept == null)
            {
                user.DeptCode = "0";
            }
            else if (dept.Nature == "部门")
            {
                var pdept = deptBll.GetEntity(dept.ParentId);
                user.DeptCode = pdept == null ? dept.EnCode : pdept.EnCode;
            }
            model.DeptCode = user.DeptCode;
            workmeetingbll.savedangertemplateentity(model);

            return(Success("成功"));
        }