Exemple #1
0
        /// <summary>
        /// 修改类别
        /// </summary>
        /// <returns></returns>
        private string UpData()
        {
            string ajlbbm = Request.Form.Get("key_hidd").Trim();

            if (string.IsNullOrEmpty(ajlbbm))
            {
                return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
            }
            string msg = string.Empty;

            if (!ProvingFrom(ref msg))
            {
                return(ReturnString.JsonToString(Prompt.error, msg, null));
            }

            XT_DZJZ_SSLB bll = new XT_DZJZ_SSLB(this.Request);

            EDRS.Model.XT_DZJZ_SSLB model = bll.GetModel(ajlbbm);
            string lbbm = string.Empty;

            if (model != null)
            {
                lbbm         = model.SSLBBM;
                model.SSLBMC = Request.Form.Get("txt_name");
                model.SSLBSX = Convert.ToDecimal(Request.Form.Get("txt_sx"));
                model.SSLBSM = Request.Form.Get("txt_sm");
                if (bll.Update(model))
                {
                    System.Collections.Hashtable hssql = new System.Collections.Hashtable();

                    hssql.Add(string.Format("update xy_dzjz_mbpzb set sslbmc='{0}',DossierTypeDisplayMember='{0}' where sslbbm='{1}'", model.SSLBMC, lbbm), null);
                    XY_DZJZ_MBPZB bllmb = new XY_DZJZ_MBPZB(this.Request);
                    bllmb.Update(hssql);


                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.参数配置Web, "修改所属类别成功", "", UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                }
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.参数配置Web, "修改所属类别失败", "", UserInfo, UserRole, this.Request);
                return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.参数配置Web, "修改所属类别未找到信息", "", UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
        }
Exemple #2
0
        /// <summary>
        /// 根据类别编号获取数据
        /// </summary>
        /// <param name="DWBM"></param>
        /// <returns></returns>
        private string GetModel(string sslbbm)
        {
            if (string.IsNullOrEmpty(sslbbm))
            {
                sslbbm = Request.Form.Get("id");
                if (string.IsNullOrEmpty(sslbbm))
                {
                    return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
                }
            }
            XT_DZJZ_SSLB bll = new XT_DZJZ_SSLB(this.Request);

            EDRS.Model.XT_DZJZ_SSLB model = bll.GetModel(sslbbm);
            if (model != null)
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.参数配置Web, "根据编号获取所属类别成功", "", UserInfo, UserRole, this.Request);
                return(JsonHelper.JsonString(model));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.参数配置Web, "根据编号获取所属类别失败", "", UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "获取数据失败", null));
        }