Esempio n. 1
0
        /// <summary>
        /// 修改配置数据
        /// </summary>
        /// <returns></returns>
        private string UpData()
        {
            string pzbm = Request.Form.Get("key_hidd").Trim();

            if (string.IsNullOrEmpty(pzbm))
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "修改功能分类的参数错误", UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
            }
            string msg = string.Empty;

            if (!ProvingFrom(ref msg))
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "修改功能分类验证失败:" + msg, Request.Form.Get("txt_mc"), UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, msg, null));
            }

            EDRS.BLL.XT_QX_GNFL   bll   = new EDRS.BLL.XT_QX_GNFL(this.Request);
            EDRS.Model.XT_QX_GNFL model = bll.GetModel(pzbm);
            if (model != null)
            {
                model.FLMC = Request.Form.Get("txt_mc").Trim();
                model.DWBM = UserInfo.DWBM;// Request.Form.Get("txt_dwbm").Trim();
                model.FLXH = Convert.ToDecimal(Request.Form.Get("txt_xh").Trim());
                if (bll.Update(model))
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "修改功能分类成功", model.FLMC, UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                }
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "修改功能分类失败", model.FLMC, UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "修改功能分类未找到信息", Request.Form.Get("txt_mc"), UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
        }
Esempio n. 2
0
 /// <summary>
 /// 根据单位获取配置数据
 /// </summary>
 /// <param name="DWBM"></param>
 /// <returns></returns>
 private string GetModel(string PZBM)
 {
     if (string.IsNullOrEmpty(PZBM))
     {
         PZBM = Request["id"];
         if (string.IsNullOrEmpty(PZBM))
         {
             //数据日志
             OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "根据编号获取功能分类信息参数错误", UserInfo, UserRole, this.Request);
             return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
         }
     }
     EDRS.BLL.XT_QX_GNFL   bll   = new EDRS.BLL.XT_QX_GNFL(this.Request);
     EDRS.Model.XT_QX_GNFL model = bll.GetModel(PZBM);
     if (model != null)
     {
         //数据日志
         OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "根据编号获取功能分类信息成功", model.FLMC, UserInfo, UserRole, this.Request);
         return(JsonHelper.JsonString(model));
     }
     //数据日志
     OperateLog.AddLog(OperateLog.LogType.功能分类管理Web, "根据编号获取功能分类信息参数失败", Request["mc"], UserInfo, UserRole, this.Request);
     return(ReturnString.JsonToString(Prompt.error, "获取数据失败", null));
 }