Beispiel #1
0
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Session["YJUser"] != null)
            //    YJUser = JsonHelper.JsonString(Session["YJUser"] as EDRS.Model.YX_DZJZ_LSAJBD);

            string type = Request["t"];

            if (!string.IsNullOrEmpty(type))
            {
                Response.ContentEncoding = Encoding.UTF8;
                Response.ContentType     = "application/json";

                if (type.Equals("ReadLogin"))
                {
                    Response.Write(ReadLogin());
                }
                if (type.Equals("GetMlTree"))
                {
                    EDRS.BLL.YX_DZJZ_JZML bll = new EDRS.BLL.YX_DZJZ_JZML(Request);
                    Response.Write(bll.GetMlTree(Request, false, true));
                }
                if (type.Equals("ListBind"))
                {
                    Response.Write(ListBind());
                }
                Response.End();
            }
        }
Beispiel #2
0
 /// <summary>
 /// 获取案件目录
 /// </summary>
 /// <returns></returns>
 private string GetMlTree()
 {
     EDRS.BLL.YX_DZJZ_JZML bll = new EDRS.BLL.YX_DZJZ_JZML(Request);
     return(bll.GetMlTree(Request, false, false));
 }
Beispiel #3
0
        /// <summary>
        /// 获取案件目录
        /// </summary>
        /// <param name="Request"></param>
        /// <param name="isAll">是否获取所有目录,false为只有已分配的</param>
        /// <param name="isChecked">是否默认选中</param>
        /// <returns></returns>
        public string GetMlTreeEx(System.Web.HttpRequest Request, bool isAll, bool isChecked)
        {
            string bmsah     = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request.Form["bmsah"]));
            string parneid   = Request["pid"];
            string ischecked = Request["ischecked"];
            string yjxh      = Request["yjxh"] ?? "";
            string sfsm      = Request.Form["wjtype"];

            string strMlWhere = " and SFSC='N'";

            string where = " and level < 3";
            string withWhere = " and FMLBH is null";

            object[] values = new object[2];
            if (!string.IsNullOrEmpty(bmsah))
            {
                strMlWhere += " and BMSAH=:BMSAH";
                values[0]   = bmsah;
            }

            //判断存在父级编码
            if (!string.IsNullOrEmpty(parneid))
            {
                withWhere = " and FMLBH =:FMLBH";
                values[1] = parneid;
            }
            if (!string.IsNullOrEmpty(sfsm) && sfsm == "N")
            {
                withWhere += " and SFSM='N'";
            }
            EDRS.BLL.YX_DZJZ_JZML bll = new EDRS.BLL.YX_DZJZ_JZML(Request);
            DataSet ds = bll.GetListByTreeEx(strMlWhere, where, withWhere, true, StringPlus.ReplaceSingle(yjxh), isAll, values);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0].Copy();
                dt.Columns["MLBH"].ColumnName   = "ID";
                dt.Columns["FMLBH"].ColumnName  = "PARENTID";
                dt.Columns["MLXSMC"].ColumnName = "NAME";
                if (isChecked)
                {
                    dt.Columns["ISEXIST"].ColumnName = "ischecked";
                }
                dt.Columns.Add("icon");
                foreach (DataRow dr in dt.Rows)
                {
                    switch (int.Parse(dr["MLLX"].ToString()))
                    {
                    case 1:
                        dr["icon"] = "jicon";
                        break;

                    case 2:
                        dr["icon"] = "mlicon";
                        break;

                    case 3:
                        dr["icon"] = "yicon";
                        break;

                    case 4:
                        dr["icon"] = "wjicon";
                        break;
                    }
                    if (dr["wjxhjl"] != null && dr["wjxhjl"].ToString() != "")
                    {
                        dr["ischecked"] = 1;
                    }
                    else
                    {
                        dr["ischecked"] = DBNull.Value;
                    }
                }

                Dictionary <string, string> styleValues = new Dictionary <string, string>();
                styleValues.Add("Y", "color:blue;");
                string json = new TreeJson(dt, "ID", "NAME", "PARENTID", "", "", parneid ?? "", true, true, "SFSM", styleValues, (ischecked == "true" ? true : false)).ResultJson.ToString();

                return(json);
            }
            return(ReturnString.JsonToString(Prompt.error, "未找到相关目录!", null));
        }
Beispiel #4
0
        /// <summary>
        /// 卷宗页获取
        /// </summary>
        /// <param name="DWBM">单位编号</param>
        /// <param name="BH">部门受案号</param>
        /// <param name="JZBH">卷宗编号</param>
        /// <param name="JZWJBH">卷宗文件编号</param>
        public string GetDossierFilePageInfo()
        {
            // string dwbm = Request.Form["dwbm"];
            string bh     = Request.Form["bh"];
            string wsbh   = Request.Form["wsbh"];
            string jzbh   = Request.Form["jzbh"];
            string jzwjbh = Request.Form["id"];

            if (string.IsNullOrEmpty(bh) || string.IsNullOrEmpty(jzbh) || string.IsNullOrEmpty(jzwjbh) || string.IsNullOrEmpty(wsbh))
            {
                return(ReturnString.JsonToString(Prompt.error, "查询参数错误", null));
            }

            // dwbm = HttpUtility.UrlDecode(HttpUtility.UrlDecode(dwbm));
            bh     = HttpUtility.UrlDecode(HttpUtility.UrlDecode(bh));
            jzbh   = HttpUtility.UrlDecode(HttpUtility.UrlDecode(jzbh));
            jzwjbh = HttpUtility.UrlDecode(HttpUtility.UrlDecode(jzwjbh));
            wsbh   = HttpUtility.UrlDecode(HttpUtility.UrlDecode(wsbh));

            EDRS.BLL.YX_DZJZ_JZJBXX bllJzjbxx = new EDRS.BLL.YX_DZJZ_JZJBXX(HttpContext.Current.Request);
            string where = "";//" and ajbh=:ajbh";

            List <object> param = new List <object>();

            if (!string.IsNullOrEmpty(bh) && bh != "null")
            {
                where += " and ajbh=:ajbh";
                param.Add(bh);
            }
            if (!string.IsNullOrEmpty(wsbh) && wsbh != "null")
            {
                where += " and wsbh=:wsbh";
                param.Add(wsbh);
            }


            List <EDRS.Model.YX_DZJZ_JZJBXX> list = bllJzjbxx.GetModelList(where, param.ToArray());

            if (list == null || list.Count == 0)
            {
                return(ReturnString.JsonToString(Prompt.error, "未能查询到案件编号为【" + bh + "】的卷宗数据!", null));
            }
            bh = list[0].BMSAH;
            //返回参数
            string Str = string.Empty;

            EDRS.BLL.YX_DZJZ_JZML bll = new EDRS.BLL.YX_DZJZ_JZML(HttpContext.Current.Request);
            DataSet ds = bll.GetDossierFilePageInfo("", bh, jzbh, jzwjbh);

            //判断是否查询出现异常
            if (ds != null && ds.Tables.Count > 0)
            {
                //判断查询没有数据
                if (ds.Tables[0].Rows.Count > 0)
                {
                    //成功
                    DataTable dtData = ds.Tables[0].Copy();
                    dtData.Columns["JZWJYBH"].ColumnName = "id";
                    dtData.Columns["JZWJYMC"].ColumnName = "name";
                    dtData.Columns.Add("pId");
                    dtData.Columns.Add("title");
                    dtData.Columns.Add("isParent");
                    dtData.Columns.Add("type");
                    dtData.Columns.Add("icon");
                    DataColumn dc = new DataColumn();
                    dc.ColumnName   = "nocheck";
                    dc.DefaultValue = true;
                    dtData.Columns.Add(dc);
                    for (int i = 0; i < dtData.Rows.Count; i++)
                    {
                        dtData.Rows[i]["isParent"] = false;
                        dtData.Rows[i]["pId"]      = -1;
                        dtData.Rows[i]["title"]    = dtData.Rows[i]["name"];
                        dtData.Rows[i]["type"]     = "y";
                        dtData.Rows[i]["icon"]     = "img/TextBox_16x16.png";
                    }

                    return(JsonHelper.JsonString(dtData));
                }
                else
                {
                    //该案件没有卷
                    return(ReturnString.JsonToString(Prompt.error, "该文件信息下没有文件页", null));
                }
            }
            else
            {
                //查询失败
                return(ReturnString.JsonToString(Prompt.error, "查询失败", null));
            }
        }
Beispiel #5
0
        /// <summary>
        /// 卷宗文件获取接口
        /// </summary>
        /// <param name="DWBM"></param>
        /// <param name="BH"></param>
        /// <param name="JZBH"></param>
        public string GetDossierFileInfo()
        {
            // string dwbm = Request.Form["dwbm"];
            string bh   = Request.Form["id"];
            string jzbh = Request.Form["jzbh"];

            //if (string.IsNullOrEmpty(dwbm) || string.IsNullOrEmpty(bh) || string.IsNullOrEmpty(jzbh))
            //    return ReturnString.JsonToString(Prompt.error, "查询参数错误", null);
            if (string.IsNullOrEmpty(bh) || string.IsNullOrEmpty(jzbh))
            {
                return(ReturnString.JsonToString(Prompt.error, "查询参数错误", null));
            }
            //      dwbm = HttpUtility.UrlDecode(HttpUtility.UrlDecode(dwbm));
            bh   = HttpUtility.UrlDecode(HttpUtility.UrlDecode(bh));
            jzbh = HttpUtility.UrlDecode(HttpUtility.UrlDecode(jzbh));

            //返回参数
            EDRS.BLL.YX_DZJZ_JZML bll = new EDRS.BLL.YX_DZJZ_JZML(HttpContext.Current.Request);
            DataSet ds = bll.GetDossierFileInfo("", bh, jzbh);

            //判断是否查询出现异常
            if (ds != null && ds.Tables.Count > 0)
            {
                //判断查询没有数据
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DataTable dtData = ds.Tables[0].Copy();
                    dtData.Columns["JZWJBH"].ColumnName = "id";
                    dtData.Columns["JZWJMC"].ColumnName = "name";
                    dtData.Columns.Add("pId");
                    dtData.Columns.Add("title");
                    dtData.Columns.Add("isParent");
                    dtData.Columns.Add("type");
                    dtData.Columns.Add("icon");
                    DataColumn dc = new DataColumn();
                    dc.ColumnName   = "nocheck";
                    dc.DefaultValue = true;
                    dtData.Columns.Add(dc);

                    for (int i = 0; i < dtData.Rows.Count; i++)
                    {
                        if (Convert.ToInt32(dtData.Rows[i]["JZWJYSL"]) > 0)
                        {
                            dtData.Rows[i]["isParent"] = true;
                        }
                        else
                        {
                            dtData.Rows[i]["isParent"] = false;
                        }

                        dtData.Rows[i]["pId"]   = -1;
                        dtData.Rows[i]["title"] = dtData.Rows[i]["name"];
                        dtData.Rows[i]["type"]  = "w";
                        dtData.Rows[i]["icon"]  = "img/GroupHeader_16x16.png";
                    }
                    return(JsonHelper.JsonString(dtData));
                }
                else
                {
                    return(GetDossierFilePageInfo());
                    //该案件没有卷
                    // return ReturnString.JsonToString(Prompt.error, "该卷宗没有文件信息", null);
                }
            }
            else
            {
                //查询失败
                return(ReturnString.JsonToString(Prompt.error, "查询失败", null));
            }
        }
Beispiel #6
0
        /// <summary>
        /// 卷宗信息获取
        /// </summary>
        /// <param name="bmsah"></param>
        public string GetDossierInfo()
        {
            try
            {
                // string dwbm = Request.Form["dwbm"];
                string bh     = Request.Form["bh"];
                string wsbh   = Request.Form["wsbh"];
                string wsbh_n = Request.Form["n"];
                //if (string.IsNullOrEmpty(dwbm) || string.IsNullOrEmpty(bh))
                //    return ReturnString.JsonToString(Prompt.error, "查询参数错误", null);
                if (string.IsNullOrEmpty(bh))
                {
                    return(ReturnString.JsonToString(Prompt.error, "查询参数错误", null));
                }

                // dwbm = HttpUtility.UrlDecode(HttpUtility.UrlDecode(dwbm));
                bh = HttpUtility.UrlDecode(HttpUtility.UrlDecode(bh));

                EDRS.BLL.YX_DZJZ_JZJBXX bllJzjbxx = new EDRS.BLL.YX_DZJZ_JZJBXX(HttpContext.Current.Request);
                //string where = " and ajbh=:ajbh and dwbm = :dwbm";
                string where = "";// " and ajbh=:ajbh";

                List <object> param = new List <object>();

                if (!string.IsNullOrEmpty(bh) && bh != "null")
                {
                    where += " and ajbh=:ajbh";
                    param.Add(bh);
                }
                if (!string.IsNullOrEmpty(wsbh) && wsbh != "null")
                {
                    where += " and wsbh=:wsbh";
                    param.Add(wsbh);
                }

                List <EDRS.Model.YX_DZJZ_JZJBXX> list = bllJzjbxx.GetModelList(where, param.ToArray());
                if (list == null || list.Count == 0)
                {
                    return(ReturnString.JsonToString(Prompt.error, "未能查询到案件编号为【" + bh + "】的卷宗数据!", null));
                }


                list = list.Where(p => p.WSBH == wsbh_n).ToList <EDRS.Model.YX_DZJZ_JZJBXX>();

                bh = list[0].BMSAH;

                //返回参数
                EDRS.BLL.YX_DZJZ_JZML bll = new EDRS.BLL.YX_DZJZ_JZML(HttpContext.Current.Request);
                DataSet ds = bll.GetDossierInfo(bh, "");
                //判断是否查询出现异常
                if (ds != null && ds.Tables.Count > 0)
                {
                    //判断查询没有数据
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        DataTable dtData = ds.Tables[0].Copy();
                        dtData.Columns["BH"].ColumnName     = "id";
                        dtData.Columns["JZLBMC"].ColumnName = "name";
                        dtData.Columns.Add("pId");
                        dtData.Columns.Add("title");
                        dtData.Columns.Add("isParent");
                        dtData.Columns.Add("type");
                        dtData.Columns.Add("icon");
                        DataColumn dc = new DataColumn();
                        dc.ColumnName   = "nocheck";
                        dc.DefaultValue = true;
                        dtData.Columns.Add(dc);
                        for (int i = 0; i < dtData.Rows.Count; i++)
                        {
                            if (Convert.ToInt32(dtData.Rows[i]["JZWJSL"]) > 0 || Convert.ToInt32(dtData.Rows[i]["JZWJSL2"]) > 0)
                            {
                                dtData.Rows[i]["isParent"] = true;
                            }
                            else
                            {
                                dtData.Rows[i]["isParent"] = false;
                            }

                            dtData.Rows[i]["pId"]   = -1;
                            dtData.Rows[i]["title"] = dtData.Rows[i]["name"];
                            dtData.Rows[i]["type"]  = "j";
                            dtData.Rows[i]["icon"]  = "img/Content_16x16.png";
                        }

                        return(JsonHelper.JsonString(dtData));

                        //成功
                        //  return EDRS.Common.JsonHelper.JsonString(ds.Tables[0]);
                    }
                    else
                    {
                        //该案件没有卷
                        return(ReturnString.JsonToString(Prompt.error, "该卷宗信息下没有文件", null));
                    }
                }
                else
                {
                    //查询失败
                    return(ReturnString.JsonToString(Prompt.error, "查询失败", null));
                }
            }
            catch (Exception ex)
            {
                LogHelper.LogError(Request, "Exception", ex.Message, "public string GetDossierInfo()", "GetDossierPage");
                return(ReturnString.JsonToString(Prompt.error, "查询失败", null));
            }
        }