Exemple #1
0
        private string submitapply()
        {
            EDRS.BLL.YX_DZJZ_JZMLWJ bll   = new EDRS.BLL.YX_DZJZ_JZMLWJ(Request);
            EDRS.BLL.YX_DZJZ_WJSQDY BLLSQ = new EDRS.BLL.YX_DZJZ_WJSQDY(Request);
            string id   = Request["id"];
            string wjxh = Request.Form["yjxh"];
            string sq   = string.Empty;

            if (!string.IsNullOrEmpty(id))
            {
                sq = " and JZWJBH=:JZWJBH";
            }

            DataSet   d  = BLLSQ.GetList(sq, new[] { id });
            DataTable dt = d.Tables[0];

            //判断该案件是否已在申请中.
            if (dt != null && dt.Rows.Count == 0)
            {
                string str = string.Empty;
                str = " and wjxh=:wjxh";
                DataSet ds = bll.GetList(str, new[] { id });
                if (ds.Tables[0].Rows.Count > 0)
                {
                    //string bmsah = ds.Tables[0].Rows[0]["BMSAH"].ToString();
                    EDRS.Model.YX_DZJZ_WJSQDY model = new EDRS.Model.YX_DZJZ_WJSQDY();
                    model.BMSAH  = ds.Tables[0].Rows[0]["BMSAH"].ToString();
                    model.DYBMBM = "";  //打印部门编码
                    model.DYBMMC = "";
                    model.DYDWBM = "";
                    model.DYDWMC = "";
                    model.DYFS   = null;         //打印份数
                    model.DYFY   = null;         //打印费用
                    model.DYR    = "";           //打印人
                    model.DYRGH  = "";           //打印人工号
                    model.DYSJ   = null;         //打印时间
                    model.LSZH   = UserInfo.GH;  //律师证号
                    model.DYSQDH = DateTime.Now.ToString("yyyyMMddHHmmssfff") + model.LSZH;
                    model.JZWJBH = id;           //文件编号
                    model.SFSC   = "N";
                    model.SQFS   = 1;            //申请份数
                    model.SQSJ   = DateTime.Now; //申请时间
                    model.YJXH   = wjxh;         //阅卷序号

                    if (BLLSQ.Add(model))
                    {
                        return(ReturnString.JsonToString(Prompt.win, "申请成功", null));
                    }
                    else
                    {
                        return(ReturnString.JsonToString(Prompt.error, "申请失败", null));
                    }
                }
            }
            else
            {
                return(ReturnString.JsonToString(Prompt.error, "该文件已申请", null));
            }
            return(ReturnString.JsonToString(Prompt.error, "未获取文件信息", null));
        }
Exemple #2
0
        public string submitapplyall()
        {
            EDRS.BLL.YX_DZJZ_JZMLWJ bll   = new EDRS.BLL.YX_DZJZ_JZMLWJ(Request);
            EDRS.BLL.YX_DZJZ_WJSQDY BLLSQ = new EDRS.BLL.YX_DZJZ_WJSQDY(Request);
            string idstr = Request.Form["idstr[]"];
            string yjxh  = Request.Form["yjxh"];

            if (!string.IsNullOrEmpty(idstr))
            {
                List <EDRS.Model.YX_DZJZ_WJSQDY> wlist = new List <EDRS.Model.YX_DZJZ_WJSQDY>();
                string[] idarr = idstr.Split(',');

                for (int i = 0; i < idarr.Length; i++)
                {
                    string sq = string.Empty;
                    sq = " and JZWJBH=:JZWJBH";
                    DataSet   d  = BLLSQ.GetList(sq, new[] { idarr[i] });
                    DataTable dt = d.Tables[0];
                    //判断是否存在该申请记录
                    if (dt != null && dt.Rows.Count == 0)
                    {
                        string lszh = UserInfo.GH;
                        string str  = string.Empty;
                        str = " and wjxh=:wjxh";
                        DataSet ds = bll.GetList(str, new[] { idarr[i] });
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            EDRS.Model.YX_DZJZ_WJSQDY model = new EDRS.Model.YX_DZJZ_WJSQDY();
                            model.BMSAH  = ds.Tables[0].Rows[0]["BMSAH"].ToString();
                            model.DYBMBM = "";  //打印部门编码
                            model.DYBMMC = "";
                            model.DYDWBM = "";
                            model.DYDWMC = "";
                            model.DYFS   = null;         //打印份数
                            model.DYFY   = null;         //打印费用
                            model.DYR    = "";           //打印人
                            model.DYRGH  = "";           //打印人工号
                            model.DYSJ   = null;         //打印时间
                            model.LSZH   = UserInfo.GH;  //律师证号
                            model.DYSQDH = DateTime.Now.ToString("yyyyMMddHHmmssfff") + model.LSZH;
                            model.JZWJBH = idarr[i];     //文件编号
                            model.SFSC   = "N";
                            model.SQFS   = 1;            //申请份数
                            model.SQSJ   = DateTime.Now; //申请时间
                            model.YJXH   = yjxh;         //阅卷序号
                            //添加到集合
                            wlist.Add(model);
                        }
                    }
                }
                if (BLLSQ.AddList(wlist))
                {
                    return(ReturnString.JsonToString(Prompt.win, "提交申请成功", null));
                }
                else
                {
                    return(ReturnString.JsonToString(Prompt.error, "提交申请失败", null));
                }
            }
            return(ReturnString.JsonToString(Prompt.error, "未获取文件信息", null));
        }