Exemplo n.º 1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <returns></returns>
        private string Update()
        {
            string SQBM = Request["hidd_sqbm"];

            if (string.IsNullOrEmpty(SQBM))
            {
                return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
            }
            EDRS.BLL.YX_DZJZ_LSYJXZSQ   bll   = new EDRS.BLL.YX_DZJZ_LSYJXZSQ();
            EDRS.Model.YX_DZJZ_LSYJXZSQ model = bll.GetModel(SQBM);
            if (model != null)
            {
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_lszh"), 1, 100))
                {
                    return(ReturnString.JsonToString(Prompt.error, "律师证号" + PageValidate.Msg, "txt_lszh"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_lsxm"), 1, 50))
                {
                    return(ReturnString.JsonToString(Prompt.error, "律师姓名" + PageValidate.Msg, "txt_lsxm"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_ssdw"), 1, 200))
                {
                    return(ReturnString.JsonToString(Prompt.error, "所属单位" + PageValidate.Msg, "txt_ssdw"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_ajmc"), 1, 200))
                {
                    return(ReturnString.JsonToString(Prompt.error, "名称" + PageValidate.Msg, "txt_ajmc"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_xyrmc"), 1, 50))
                {
                    return(ReturnString.JsonToString(Prompt.error, "嫌疑人" + PageValidate.Msg, "txt_xyrmc"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_sqrmc"), 1, 50))
                {
                    return(ReturnString.JsonToString(Prompt.error, "申请人" + PageValidate.Msg, "txt_sqrmc"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_sqdw"), 1, 200))
                {
                    return(ReturnString.JsonToString(Prompt.error, "申请单位" + PageValidate.Msg, "txt_sqdw"));
                }
                model.LSZH  = Request.Form.Get("txt_lszh");
                model.LSXM  = Request.Form.Get("txt_lsxm");
                model.SSDW  = Request.Form.Get("txt_ssdw");
                model.AJMC  = Request.Form.Get("txt_ajmc");
                model.XYRMC = Request.Form.Get("txt_xyrmc");
                model.SQRMC = Request.Form.Get("txt_sqrmc");
                model.SQDW  = Request.Form.Get("txt_sqdw");

                if (bll.Update(model))
                {
                    return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                }
                return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
            }
            return(ReturnString.JsonToString(Prompt.error, "修改信息不存在", null));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        private string AddData()
        {
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_lszh"), 1, 100))
            {
                return(ReturnString.JsonToString(Prompt.error, "律师证号" + PageValidate.Msg, "txt_lszh"));
            }
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_lsxm"), 1, 50))
            {
                return(ReturnString.JsonToString(Prompt.error, "律师姓名" + PageValidate.Msg, "txt_lsxm"));
            }
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_ssdw"), 1, 200))
            {
                return(ReturnString.JsonToString(Prompt.error, "所属单位" + PageValidate.Msg, "txt_ssdw"));
            }
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_ajmc"), 1, 200))
            {
                return(ReturnString.JsonToString(Prompt.error, "名称" + PageValidate.Msg, "txt_ajmc"));
            }
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_xyrmc"), 1, 50))
            {
                return(ReturnString.JsonToString(Prompt.error, "嫌疑人" + PageValidate.Msg, "txt_xyrmc"));
            }
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_sqrmc"), 1, 50))
            {
                return(ReturnString.JsonToString(Prompt.error, "申请人" + PageValidate.Msg, "txt_sqrmc"));
            }
            if (!PageValidate.IsLengthStr(Request.Form.Get("txt_sqdw"), 1, 200))
            {
                return(ReturnString.JsonToString(Prompt.error, "申请单位" + PageValidate.Msg, "txt_sqdw"));
            }

            EDRS.Model.YX_DZJZ_LSYJXZSQ model = new EDRS.Model.YX_DZJZ_LSYJXZSQ();
            model.LSZH  = Request.Form.Get("txt_lszh");
            model.LSXM  = Request.Form.Get("txt_lsxm");
            model.SSDW  = Request.Form.Get("txt_ssdw");
            model.AJMC  = Request.Form.Get("txt_ajmc");
            model.XYRMC = Request.Form.Get("txt_xyrmc");
            model.SQRMC = Request.Form.Get("txt_sqrmc");
            model.SQDW  = Request.Form.Get("txt_sqdw");
            model.XZDZ  = "";
            model.SQDZT = "D";
            model.SQSJ  = DateTime.Now;
            model.BZ    = "";
            model.SFSC  = "N";
            model.SHRGH = "";
            model.SHR   = "";
            //model.SHSJ = "";

            EDRS.BLL.YX_DZJZ_LSYJXZSQ bll = new EDRS.BLL.YX_DZJZ_LSYJXZSQ();
            if (bll.Add(model))
            {
                return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
            }
            return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(EDRS.Model.YX_DZJZ_LSYJXZSQ model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into YX_DZJZ_LSYJXZSQ(");
            strSql.Append("LSZH,LSXM,SSDW,AJMC,XYRMC,SQRMC,SQDW,XZDZ,SQDZT,SQSJ,BZ,SFSC,SHRGH,SHR,SHSJ)");
            strSql.Append(" values (");
            strSql.Append(":LSZH,:LSXM,:SSDW,:AJMC,:XYRMC,:SQRMC,:SQDW,:XZDZ,:SQDZT,:SQSJ,:BZ,:SFSC,:SHRGH,:SHR,:SHSJ)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":LSZH",  OracleType.VarChar,   100),
                new OracleParameter(":LSXM",  OracleType.VarChar,    50),
                new OracleParameter(":SSDW",  OracleType.VarChar,   200),
                new OracleParameter(":AJMC",  OracleType.VarChar,   200),
                new OracleParameter(":XYRMC", OracleType.VarChar,    50),
                new OracleParameter(":SQRMC", OracleType.VarChar,    50),
                new OracleParameter(":SQDW",  OracleType.VarChar,   200),
                new OracleParameter(":XZDZ",  OracleType.VarChar,   500),
                new OracleParameter(":SQDZT", OracleType.Char,        1),
                new OracleParameter(":SQSJ",  OracleType.DateTime),
                new OracleParameter(":BZ",    OracleType.VarChar,   300),
                new OracleParameter(":SFSC",  OracleType.Char,        1),
                new OracleParameter(":SHRGH", OracleType.Char,        4),
                new OracleParameter(":SHR",   OracleType.VarChar,    60),
                new OracleParameter(":SHSJ",  OracleType.DateTime)
            };
            parameters[0].Value  = model.LSZH;
            parameters[1].Value  = model.LSXM;
            parameters[2].Value  = model.SSDW;
            parameters[3].Value  = model.AJMC;
            parameters[4].Value  = model.XYRMC;
            parameters[5].Value  = model.SQRMC;
            parameters[6].Value  = model.SQDW;
            parameters[7].Value  = model.XZDZ;
            parameters[8].Value  = model.SQDZT;
            parameters[9].Value  = model.SQSJ;
            parameters[10].Value = model.BZ;
            parameters[11].Value = model.SFSC;
            parameters[12].Value = model.SHRGH;
            parameters[13].Value = model.SHR;
            parameters[14].Value = model.SHSJ ?? (object)DBNull.Value;

            if (DbHelperOra.ExecuteSql(strSql.ToString(), parameters) > 0)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获取对象
        /// </summary>
        /// <returns></returns>
        private string GetModelById()
        {
            string SQBM = Request["sqbm"];

            if (string.IsNullOrEmpty(SQBM))
            {
                return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
            }
            EDRS.BLL.YX_DZJZ_LSYJXZSQ   bll   = new EDRS.BLL.YX_DZJZ_LSYJXZSQ();
            EDRS.Model.YX_DZJZ_LSYJXZSQ model = bll.GetModel(SQBM);
            if (model != null)
            {
                return(JsonHelper.JsonString(model));
            }
            return(ReturnString.JsonToString(Prompt.error, "获取数据失败", null));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public EDRS.Model.YX_DZJZ_LSYJXZSQ GetModel(string SQBM)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select SQBM,LSZH,LSXM,SSDW,AJMC,XYRMC,SQRMC,SQDW,XZDZ,SQDZT,SQSJ,BZ,SFSC,SHRGH,SHR,SHSJ from YX_DZJZ_LSYJXZSQ ");
            strSql.Append(" where SQBM=:SQBM ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":SQBM", OracleType.VarChar, 50)
            };
            parameters[0].Value = SQBM;

            EDRS.Model.YX_DZJZ_LSYJXZSQ model = new EDRS.Model.YX_DZJZ_LSYJXZSQ();
            DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                model.SQBM  = ds.Tables[0].Rows[0]["SQBM"].ToString();
                model.LSZH  = ds.Tables[0].Rows[0]["LSZH"].ToString();
                model.LSXM  = ds.Tables[0].Rows[0]["LSXM"].ToString();
                model.SSDW  = ds.Tables[0].Rows[0]["SSDW"].ToString();
                model.AJMC  = ds.Tables[0].Rows[0]["AJMC"].ToString();
                model.XYRMC = ds.Tables[0].Rows[0]["XYRMC"].ToString();
                model.SQRMC = ds.Tables[0].Rows[0]["SQRMC"].ToString();
                model.SQDW  = ds.Tables[0].Rows[0]["SQDW"].ToString();
                model.XZDZ  = ds.Tables[0].Rows[0]["XZDZ"].ToString();
                model.SQDZT = ds.Tables[0].Rows[0]["SQDZT"].ToString();
                if (ds.Tables[0].Rows[0]["SQSJ"].ToString() != "")
                {
                    model.SQSJ = DateTime.Parse(ds.Tables[0].Rows[0]["SQSJ"].ToString());
                }
                model.BZ    = ds.Tables[0].Rows[0]["BZ"].ToString();
                model.SFSC  = ds.Tables[0].Rows[0]["SFSC"].ToString();
                model.SHRGH = ds.Tables[0].Rows[0]["SHRGH"].ToString();
                model.SHR   = ds.Tables[0].Rows[0]["SHR"].ToString();
                if (ds.Tables[0].Rows[0]["SHSJ"].ToString() != "")
                {
                    model.SHSJ = DateTime.Parse(ds.Tables[0].Rows[0]["SHSJ"].ToString());
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <returns></returns>
        private string Update()
        {
            string SQBM = Request["hidd_sqbm"];

            if (string.IsNullOrEmpty(SQBM))
            {
                return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
            }
            EDRS.BLL.YX_DZJZ_LSYJXZSQ   bll   = new EDRS.BLL.YX_DZJZ_LSYJXZSQ();
            EDRS.Model.YX_DZJZ_LSYJXZSQ model = bll.GetModel(SQBM);
            if (model != null)
            {
                if (Request.Form.Get("rad_sqdzt") == null)
                {
                    return(ReturnString.JsonToString(Prompt.error, "审核状态" + PageValidate.Msg, "rad_sqdzt"));
                }
                if (!PageValidate.IsLengthStr(Request.Form.Get("txt_bz"), 0, 300))
                {
                    return(ReturnString.JsonToString(Prompt.error, "备注" + PageValidate.Msg, "txt_bz"));
                }

                model.SHRGH = UserInfo.GH;
                model.SHR   = UserInfo.MC;
                model.SQDZT = Request.Form.Get("rad_sqdzt");
                model.SHSJ  = DateTime.Now;
                if (model.SQDZT == "Y")
                {
                    model.XZDZ = "http://dddd";
                }
                model.BZ = Request.Form.Get("txt_bz");

                if (bll.Update(model))
                {
                    return(ReturnString.JsonToString(Prompt.win, "保存成功", null));
                }
                return(ReturnString.JsonToString(Prompt.error, "保存失败", null));
            }
            return(ReturnString.JsonToString(Prompt.error, "修改信息不存在", null));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(EDRS.Model.YX_DZJZ_LSYJXZSQ model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update YX_DZJZ_LSYJXZSQ set ");
            strSql.Append("LSZH=:LSZH,");
            strSql.Append("LSXM=:LSXM,");
            strSql.Append("SSDW=:SSDW,");
            strSql.Append("AJMC=:AJMC,");
            strSql.Append("XYRMC=:XYRMC,");
            strSql.Append("SQRMC=:SQRMC,");
            strSql.Append("SQDW=:SQDW,");
            strSql.Append("XZDZ=:XZDZ,");
            strSql.Append("SQDZT=:SQDZT,");
            strSql.Append("SQSJ=:SQSJ,");
            strSql.Append("BZ=:BZ,");
            strSql.Append("SFSC=:SFSC,");
            strSql.Append("SHRGH=:SHRGH,");
            strSql.Append("SHR=:SHR,");
            strSql.Append("SHSJ=:SHSJ");
            strSql.Append(" where SQBM=:SQBM ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":SQBM",  OracleType.VarChar,    50),
                new OracleParameter(":LSZH",  OracleType.VarChar,   100),
                new OracleParameter(":LSXM",  OracleType.VarChar,    50),
                new OracleParameter(":SSDW",  OracleType.VarChar,   200),
                new OracleParameter(":AJMC",  OracleType.VarChar,   200),
                new OracleParameter(":XYRMC", OracleType.VarChar,    50),
                new OracleParameter(":SQRMC", OracleType.VarChar,    50),
                new OracleParameter(":SQDW",  OracleType.VarChar,   200),
                new OracleParameter(":XZDZ",  OracleType.VarChar,   500),
                new OracleParameter(":SQDZT", OracleType.Char,        1),
                new OracleParameter(":SQSJ",  OracleType.DateTime),
                new OracleParameter(":BZ",    OracleType.VarChar,   300),
                new OracleParameter(":SFSC",  OracleType.Char,        1),
                new OracleParameter(":SHRGH", OracleType.Char,        4),
                new OracleParameter(":SHR",   OracleType.VarChar,    60),
                new OracleParameter(":SHSJ",  OracleType.DateTime)
            };
            parameters[0].Value  = model.SQBM;
            parameters[1].Value  = model.LSZH;
            parameters[2].Value  = model.LSXM;
            parameters[3].Value  = model.SSDW;
            parameters[4].Value  = model.AJMC;
            parameters[5].Value  = model.XYRMC;
            parameters[6].Value  = model.SQRMC;
            parameters[7].Value  = model.SQDW;
            parameters[8].Value  = model.XZDZ;
            parameters[9].Value  = model.SQDZT;
            parameters[10].Value = model.SQSJ;
            parameters[11].Value = model.BZ;
            parameters[12].Value = model.SFSC;
            parameters[13].Value = model.SHRGH;
            parameters[14].Value = model.SHR;
            parameters[15].Value = model.SHSJ ?? (object)DBNull.Value;

            if (DbHelperOra.ExecuteSql(strSql.ToString(), parameters) > 0)
            {
                return(true);
            }
            return(false);
        }