Beispiel #1
0
        //#region 添加数据
        ///// <summary>
        ///// 添加数据
        ///// </summary>
        ///// <returns></returns>
        //public string AddData()
        //{
        //    EDRS.Model.YX_DZJZ_JZAJXX model = new EDRS.Model.YX_DZJZ_JZAJXX();
        //    model.BMSAH = Request.Form.Get("txt_BMSAH");
        //    model.AJMC = Request.Form.Get("txt_AJMC");
        //    model.AJLB_BM = Request.Form.Get("sct_AJLB_BM");
        //    model.AJLB_BM = Request.Form.Get("sct_CBDWBM");
        //    model.FQL = "4";
        //    YX_DZJZ_JZAJXX jzajxx = new YX_DZJZ_JZAJXX(this.Request);
        //    if (jzajxx.Add(model))
        //        return ReturnString.JsonToString(Prompt.win, "保存成功", null);
        //    return ReturnString.JsonToString(Prompt.error, "保存失败", null);
        //}
        //#endregion

        //#region 编辑数据
        ///// <summary>
        ///// 编辑数据
        ///// </summary>
        ///// <returns></returns>
        //public string UpData()
        //{
        //    YX_DZJZ_JZAJXX jzajxx = new YX_DZJZ_JZAJXX(this.Request);
        //    EDRS.Model.YX_DZJZ_JZAJXX model = jzajxx.GetModel(Request.Form.Get("key_hidd"));
        //    if (model != null)
        //    {
        //        model.BMSAH = Request.Form.Get("txt_BMSAH");
        //        model.AJMC = Request.Form.Get("txt_AJMC");
        //        model.AJLB_BM = Request.Form.Get("sct_AJLB_BM");
        //        model.AJLB_BM = Request.Form.Get("sct_CBDWBM");
        //        model.FQL = "4";
        //        if (jzajxx.Update(model))
        //            return ReturnString.JsonToString(Prompt.win, "修改成功", null);
        //    }
        //    return ReturnString.JsonToString(Prompt.error, "修改失败", null);
        //}
        //#endregion

        //#region 删除
        ///// <summary>
        ///// 删除
        ///// </summary>
        ///// <returns></returns>
        //private string DelData()
        //{
        //    string ids = Request.Form["BMSAH"];
        //    string[] id = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
        //    ids="";
        //    for (int i = 0; i < id.Length; i++)
        //    {
        //        ids += "'" + id[i] + "'";
        //        if (i < id.Length - 1)
        //            ids += ",";
        //    }
        //    YX_DZJZ_JZAJXX jzajxx = new YX_DZJZ_JZAJXX(this.Request);
        //    if (jzajxx.DeleteList(ids))
        //        return ReturnString.JsonToString(Prompt.win, "删除数据成功", null);
        //    return ReturnString.JsonToString(Prompt.error, "删除数据失败", null);
        //}
        //#endregion

        //#region 根据编号获取数据
        ///// <summary>
        ///// 根据编号获取数据
        ///// </summary>
        ///// <returns></returns>
        //public string GetModel(string BMSAH)
        //{
        //    if (string.IsNullOrEmpty(BMSAH))
        //    {
        //        BMSAH = Request["id"];
        //        if(string.IsNullOrEmpty(BMSAH))
        //            return ReturnString.JsonToString(Prompt.error, "参数错误", null);
        //    }
        //    YX_DZJZ_JZAJXX jzajxx = new YX_DZJZ_JZAJXX(this.Request);
        //    EDRS.Model.YX_DZJZ_JZAJXX model = jzajxx.GetModel(BMSAH);
        //    if (model != null)
        //        return JsonHelper.JsonString(model);
        //    return ReturnString.JsonToString(Prompt.error, "获取数据失败", null);
        //}
        //#endregion

        #region 解除卷宗案件基本信息锁定状态
        /// <summary>
        /// 解除卷宗案件基本信息锁定状态
        /// </summary>
        /// <returns></returns>
        private string RomIsLock()
        {
            string BMSAH = Request.Form["BMSAH"];

            if (BMSAH == null || string.IsNullOrEmpty(BMSAH))
            {
                return(ReturnString.JsonToString(Prompt.error, "解锁参数不正确", null));
            }

            YX_DZJZ_JZJBXX jzjbxx = new YX_DZJZ_JZJBXX(this.Request);
            List <EDRS.Model.YX_DZJZ_JZJBXX> jblist = jzjbxx.GetModelList(" and BMSAH=:BMSAH and SFSC='N'", new object[] { BMSAH });

            if (jblist != null && jblist.Count > 0)
            {
                EDRS.Model.YX_DZJZ_JZJBXX model = jblist[0];
                model.JZXGH  = " ";
                model.ZHXGSJ = DateTime.Now;
                if (jzjbxx.Update(model))
                {
                    OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, ((VersionName)0).ToString() + "解锁成功", BMSAH, UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.win, "解锁成功", null));
                }
            }
            OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, ((VersionName)0).ToString() + "解锁失败", BMSAH, UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "解锁失败", null));
        }
Beispiel #2
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        /// <returns></returns>
        public string UpData()
        {
            string ajmc   = Request.Form.Get("txt_ajmc");
            string lbmc   = Request.Form.Get("txt_lbmc");
            string xyr    = Request.Form.Get("txt_xyr");
            string sfzh   = Request.Form.Get("txt_sfzh");
            string taryxx = Request.Form.Get("txt_taryxx");
            string ajlb   = Request.Form.Get("txt_ajlb");
            string bmsah  = Request.Form.Get("hidd_bmsah");

            string ajbh    = Request.Form.Get("txt_ajbh");                                                            //案件编号
            string lasj    = Request.Form.Get("txt_lasj");                                                            //立案时间
            string jasj    = Request.Form.Get("txt_jasj");                                                            //结案时间
            string ladw    = Request.Form.Get("txt_ladw_val");                                                        //立卷单位
            string ladw_mc = Request.Form.Get("txt_ladw");                                                            //立卷单位名称
            string ljr     = Request.Form.Get("txt_lar_val");                                                         //立卷人
            string ljr_mc  = Request.Form.Get("txt_lar");                                                             //立卷人名称
            string shr     = Request.Form.Get("txt_shr");                                                             //审核人
            string zjs     = (string.IsNullOrEmpty(Request.Form.Get("txt_zjs")) ? "0" : Request.Form.Get("txt_zjs")); //本案共卷
            string djj     = Request.Form.Get("txt_djj");                                                             //第几卷
            string djy     = (string.IsNullOrEmpty(Request.Form.Get("txt_djy")) ? "0" : Request.Form.Get("txt_djy")); //第几页

            string wsbh = Request.Form.Get("wsbh_hidd");
            string wsmc = Request.Form.Get("txt_wsbh"); //txt_wsbh

            //案件编号
            if (string.IsNullOrEmpty(ajbh))
            {
                return(ReturnString.JsonToString(Prompt.error, "必须填写案件编号", null));
            }
            //判断案件名称
            if (string.IsNullOrEmpty(ajmc))
            {
                return(ReturnString.JsonToString(Prompt.error, "必须填写案件名称", null));
            }
            //判断案件类别
            if (string.IsNullOrEmpty(ajlb))
            {
                return(ReturnString.JsonToString(Prompt.error, "必须填写案件类别", null));
            }
            //立案时间
            if (string.IsNullOrEmpty(lasj))
            {
                return(ReturnString.JsonToString(Prompt.error, "必须选择立案时间", null));
            }
            //立卷单位
            if (string.IsNullOrEmpty(ladw))
            {
                return(ReturnString.JsonToString(Prompt.error, "必须选择立卷单位", null));
            }

            if (string.IsNullOrEmpty(bmsah))
            {
                return(ReturnString.JsonToString(Prompt.error, "未指定修改" + ((VersionName)0).ToString() + ",请重新选择修改" + ((VersionName)0).ToString(), null));
            }

            YX_DZJZ_JZJBXX bll = new YX_DZJZ_JZJBXX(Request);

            if (!string.IsNullOrEmpty(ajbh))
            {
                //  List<EDRS.Model.YX_DZJZ_JZJBXX> list = bll.GetModelList(" and ajbh=:ajbh and wsbh=:wsbh and SFSC='N' and bmsah<>:bmsah ", new object[] { ajbh, wsbh ,bmsah});

                int dataCount = bll.GetRecordCount(" and ajbh=:ajbh and wsbh=:wsbh and SFSC='N' and bmsah<>:bmsah ", new object[] { ajbh, wsbh, bmsah });
                if (dataCount > 0)
                {
                    return(ReturnString.JsonToString(Prompt.error, "案件信息【" + ajbh + "】已存在,请不要重复添加!", null));
                }
            }
            if (!string.IsNullOrEmpty(ajmc) && !string.IsNullOrEmpty(ajlb))
            {
                TYYW_GG_AJJBXX            jzajxx = new TYYW_GG_AJJBXX(this.Request);
                EDRS.Model.TYYW_GG_AJJBXX model  = jzajxx.GetModel(bmsah);
                if (model != null)
                {
                    model.AJMC    = ajmc;
                    model.AJLB_BM = ajlb;
                    model.AJLB_MC = lbmc;
                    model.XYR     = xyr;
                    model.SFZH    = sfzh;
                    model.TARYXX  = taryxx;
                    model.SLRQ    = (string.IsNullOrEmpty(lasj) ? DateTime.Now : Convert.ToDateTime(lasj));// DateTime.Now;
                    if (!string.IsNullOrEmpty(jasj))
                    {
                        model.BJRQ = Convert.ToDateTime(jasj);
                    }
                    if (!string.IsNullOrEmpty(ladw) && ladw != "null")
                    {
                        model.CBDW_BM = ladw;
                        model.CBDW_MC = ladw_mc;
                    }
                    model.CBR   = ljr_mc;
                    model.CBRGH = ljr;

                    //2016-6-6 增字段
                    model.SHR  = shr;                    //审核人
                    model.SHSJ = DateTime.Now;           //审核时间
                    model.ZJS  = Convert.ToDecimal(zjs); //总卷数
                    model.DJJ  = djj;                    //第几卷
                    model.ZYS  = Convert.ToDecimal(djy); //总页数

                    if (jzajxx.Update(model))
                    {
                        List <EDRS.Model.YX_DZJZ_JZJBXX> list = bll.GetModelList(" and BMSAH ='" + bmsah + "'", null);
                        if (list != null && list.Count > 0)
                        {
                            EDRS.Model.YX_DZJZ_JZJBXX jbxxModel = list[0];
                            jbxxModel.JZMC    = ajmc;
                            jbxxModel.Ajmb_bm = ajlb;
                            jbxxModel.Ajmb_mc = lbmc;
                            jbxxModel.WSBH    = wsbh;
                            jbxxModel.WSMC    = wsmc;
                            jbxxModel.ZHXGSJ  = DateTime.Now;
                            jbxxModel.DWBM    = model.CBDW_BM;
                            if (!bll.Update(jbxxModel))
                            {
                                OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, "卷宗基本信息修改失败", model.BMSAH, UserInfo, UserRole, this.Request);
                                return(ReturnString.JsonToString(Prompt.error, "卷宗基本信息修改失败", null));
                            }
                        }


                        OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, "修改" + ((VersionName)0).ToString() + "成功", model.BMSAH, UserInfo, UserRole, this.Request);
                        return(ReturnString.JsonToString(Prompt.win, "修改" + ((VersionName)0).ToString() + "成功", null));
                    }
                    OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, "修改" + ((VersionName)0).ToString() + "失败", model.BMSAH, UserInfo, UserRole, this.Request);
                    return(ReturnString.JsonToString(Prompt.error, "修改" + ((VersionName)0).ToString() + "失败", null));
                }
                return(ReturnString.JsonToString(Prompt.error, "修改" + ((VersionName)0).ToString() + "不存在", null));
            }
            return(ReturnString.JsonToString(Prompt.error, "请将" + ((VersionName)0).ToString() + "信息填写完整", null));
        }