コード例 #1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dwbm"></param>
        /// <returns></returns>
        private string UpData()
        {
            string dwbm = Request.Form.Get("key_hidd_up");

            if (string.IsNullOrEmpty(dwbm) || !Regex.IsMatch(dwbm, @"^[A-Za-z0-9]{1,8}$"))
            {
                return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
            }
            string msg = string.Empty;

            if (!ProvingUpFrom(ref msg))
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置验证失败" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, msg, null));
            }

            XY_DZJZ_MBPZB bll = new XY_DZJZ_MBPZB(this.Request);

            EDRS.Model.XY_DZJZ_MBPZB model = bll.GetModel(dwbm);
            if (model != null)
            {
                model.CaseInfoTypeID           = Request.Form.Get("tree_ajtype_up_val");
                model.CaseInfoTypeName         = Request.Form.Get("tree_ajtype_up") ?? "";
                model.DossierTypeDisplayMember = Request.Form.Get("txt_name_up");
                model.SSLBBM = Request.Form.Get("tree_sslb_up_val") ?? "";
                model.SSLBMC = Request.Form.Get("tree_sslb_up") ?? "";
                if (string.IsNullOrEmpty(Request.Form.Get("txt_rank_up")))
                {
                    model.SortIndex = 1;
                }
                else
                {
                    model.SortIndex = int.Parse(Request.Form.Get("txt_rank_up"));
                }
                if (bool.Parse(Request.Form.Get("chk_autoFound_up_ar")))
                {
                    model.Auto = "Y";
                }
                else
                {
                    model.Auto = "N";
                }
                if (bll.Update(model))
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置成功", Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                }
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置失败" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置未找到修改信息" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
        }
コード例 #2
0
        private string UpDate2()
        {
            string        dwbm     = Request["dwbm"];
            string        sslbbm   = Request["sslbbm"];
            string        ajlbbm   = Request["ajlbbm"];
            List <object> param    = new List <object>();
            string        strWhere = " and unitID=:dwbm";

            param.Add(dwbm);
            strWhere += " and CASEINFOTYPEID=:CASEINFOTYPEID";
            param.Add(ajlbbm);
            strWhere += " and sslbbm=:sslbbm";
            param.Add(sslbbm);
            EDRS.BLL.XY_DZJZ_MBPZB bll = new XY_DZJZ_MBPZB(Request);
            DataSet ds = bll.GetList(strWhere, param.ToArray());

            EDRS.Model.XY_DZJZ_MBPZB model = new EDRS.Model.XY_DZJZ_MBPZB();
            string msg = string.Empty;

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];
                model = bll.GetModel(dr["DOSSIERTYPEVALUEMEMBER"].ToString());
                if (model != null)
                {
                    if (string.IsNullOrEmpty(Request.Form.Get("txt_rank")))
                    {
                        model.SortIndex = 1;
                    }
                    else
                    {
                        model.SortIndex = int.Parse(Request.Form.Get("txt_rank"));
                    }
                    if (bool.Parse(Request.Form.Get("chk_autoFound_ar")))
                    {
                        model.Auto = "Y";
                    }
                    else
                    {
                        model.Auto = "N";
                    }
                    if (bll.Update(model))
                    {
                        //数据日志
                        OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置成功", Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                        return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                    }
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置失败" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
                }
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置未找到修改信息" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
        }
コード例 #3
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dwbm"></param>
        /// <returns></returns>
        private string UpData1()
        {
            string msg = string.Empty;

            XY_DZJZ_MBPZB bll = new XY_DZJZ_MBPZB(this.Request);

            EDRS.Model.XY_DZJZ_MBPZB model = bll.GetModel(Request.Form.Get("tempID"));
            if (model != null)
            {
                model.DossierTypeValueMember = Request.Form.Get("tempID");
                if (string.IsNullOrEmpty(Request.Form.Get("txt_rank")))
                {
                    model.SortIndex = 1;
                }
                else
                {
                    model.SortIndex = int.Parse(Request.Form.Get("txt_rank"));
                }
                if (bool.Parse(Request.Form.Get("chk_autoFound_ar")))
                {
                    model.Auto = "Y";
                }
                else
                {
                    model.Auto = "N";
                }
                if (bll.Update(model))
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置成功", Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                }
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置失败" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "修改模板配置未找到修改信息" + msg, Request.Form.Get("txt_name_up"), UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
        }
コード例 #4
0
        /// <summary>
        /// 根据编号获取数据
        /// </summary>
        /// <returns></returns>
        private string GetModelOrParentList()
        {
            string DossierTypeValueMember = Request["id"];

            if (string.IsNullOrEmpty(DossierTypeValueMember))
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "根据编号获取模板配置参数失败", Request.Form.Get("name"), UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
            }
            XY_DZJZ_MBPZB bll = new XY_DZJZ_MBPZB(this.Request);

            EDRS.Model.XY_DZJZ_MBPZB model = bll.GetModel(DossierTypeValueMember);
            if (model != null)
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "根据编号获取模板配置成功", Request.Form.Get("name"), UserInfo, UserRole, this.Request);
                return(EDRS.Common.JsonHelper.JsonString(model));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.卷宗模板配置Web, "根据编号获取模板配置失败", Request.Form.Get("name"), UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "获取数据失败", null));
        }