예제 #1
0
        /// <summary>
        /// 查看项目的详细
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETXMGLMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int Id = 0;

            int.TryParse(P1, out Id);
            DataTable Model = new SZHL_XMGLB().GetDTByCommand("SELECT xm.*,zd.TypeName from SZHL_XMGL xm left join JH_Auth_ZiDian zd on convert(varchar,YXJ)=convert(varchar,zd.ID) WHERE  xm.ID=" + Id + "");

            msg.Result = Model;
            if (Model != null && Model.Rows.Count > 0)
            {
                DataTable dtpl = new JH_Auth_TLB().GetTL("XMGL", Model.Rows[0]["ID"].ToString());
                msg.Result1 = dtpl;

                DataTable filedt = dtpl.Copy();
                if (filedt != null && filedt.Rows.Count > 0)
                {
                    foreach (DataRow dr in filedt.Rows)
                    {
                        if (dr["MSGisHasFiles"] == null || dr["MSGisHasFiles"].ToString() == "")
                        {
                            dr.Delete();
                        }
                    }
                    filedt.AcceptChanges();
                    msg.Result3 = filedt;
                }

                if (Model.Rows[0]["Files"].ToString() != "")
                {
                    int[]          fileIDs  = Model.Rows[0]["Files"].ToString().SplitTOInt(',');
                    List <FT_File> FileList = new FT_FileB().GetEntities(d => fileIDs.Contains(d.ID)).ToList();
                    msg.Result2 = FileList;
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 更新会议情况
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void UPDATEHYQK(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int Id = int.Parse(P1);

            var hy = new SZHL_HYGLB().GetEntity(p => p.ID == Id);

            if ((hy.FQUser != null && hy.FQUser.Split(',').Contains(UserInfo.User.UserName)) || (hy.CYUser != null && hy.CYUser.Split(',').Contains(UserInfo.User.UserName)) || (hy.JLUser != null && hy.JLUser.Split(',').Contains(UserInfo.User.UserName)) || (hy.ZCUser != null && hy.ZCUser.Split(',').Contains(UserInfo.User.UserName)) || (hy.SXUser != null && hy.SXUser.Split(',').Contains(UserInfo.User.UserName)))
            {
                var tl = new JH_Auth_TLB().GetEntity(p => p.ComId == UserInfo.User.ComId && p.MSGTLYID == P1 && p.CRUser == UserInfo.User.UserName && p.MsgISShow == P2 && p.MSGType == "HYGL");
                if (tl == null)
                {
                    JH_Auth_TL jat = new JH_Auth_TL();
                    jat.ComId     = UserInfo.User.ComId;
                    jat.MSGType   = "HYGL";
                    jat.MSGTLYID  = P1;
                    jat.MsgISShow = P2;

                    //已阅,确认,签到,请假就1,2,3,4
                    if (P2 == "1")
                    {
                        jat.MSGContent = "已阅";
                    }
                    else if (P2 == "2")
                    {
                        jat.MSGContent = "确认参加";
                    }
                    else if (P2 == "3")
                    {
                        jat.MSGContent = "签到";
                    }
                    else if (P2 == "4")
                    {
                        jat.MSGContent = "请假";
                    }
                    var qjsy = context.Request["QJSY"] ?? "";
                    if (qjsy != "")
                    {
                        jat.Remark = qjsy;
                    }
                    jat.CRUser     = UserInfo.User.UserName;
                    jat.CRUserName = UserInfo.User.UserRealName;
                    jat.CRDate     = DateTime.Now;

                    new JH_Auth_TLB().Insert(jat);

                    msg.Result = jat;
                }
            }
        }
예제 #3
0
        public DataTable GetTL(string strMsgType, string MSGTLYID)
        {
            DataTable dtList = new DataTable();

            dtList = new JH_Auth_TLB().GetDTByCommand("  SELECT *  FROM JH_Auth_TL WHERE MSGType='" + strMsgType + "' AND  MSGTLYID='" + MSGTLYID + "'");
            dtList.Columns.Add("FileList", Type.GetType("System.Object"));
            foreach (DataRow dr in dtList.Rows)
            {
                if (dr["MSGisHasFiles"] != null && dr["MSGisHasFiles"].ToString() != "")
                {
                    int[] fileIds = dr["MSGisHasFiles"].ToString().SplitTOInt(',');
                    dr["FileList"] = new FT_FileB().GetEntities(d => fileIds.Contains(d.ID));
                }
            }
            return(dtList);
        }
예제 #4
0
        /// <summary>
        /// 话题点赞
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void ZANHTBYID(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int id = 0;

            if (int.TryParse(P1, out id))
            {
                List <JH_Auth_TL> tls = new JH_Auth_TLB().GetEntities(d => d.ComId == UserInfo.User.ComId && d.MSGType == "TSSQ" && d.CRUser == UserInfo.User.UserName && (d.MsgISShow == "Y" || d.MsgISShow == "N") && d.MSGTLYID == P1).ToList();
                if (tls.Count > 0)
                {
                    //if (tls[0].CRUser != UserInfo.User.UserName)
                    //{
                    //    SZHL_TXSX CSTX = new SZHL_TXSX();
                    //    CSTX.Date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    //    CSTX.APIName = "TSSQ";
                    //    CSTX.ComId = UserInfo.User.ComId;
                    //    CSTX.FunName = "SENDQXZANMSG";
                    //    CSTX.CRUserRealName = UserInfo.User.UserRealName;
                    //    CSTX.MsgID = tls[0].MSGTLYID;

                    //    CSTX.TXContent = "";
                    //    CSTX.ISCS = "N";
                    //    CSTX.TXUser = tls[0].CRUser;
                    //    CSTX.TXMode = tls[0].MSGType;
                    //    CSTX.CRUser = UserInfo.User.UserName;

                    //    TXSX.TXSXAPI.AddALERT(CSTX); //时间为发送时间
                    //}

                    //new JH_Auth_TLB().Delete(tls[0]);
                    if (tls[0].MsgISShow == "N")
                    {
                        tls[0].MsgISShow = "Y";
                        new JH_Auth_TLB().Update(tls[0]);
                        msg.Result = tls[0];
                    }
                    else if (tls[0].MsgISShow == "Y")
                    {
                        tls[0].MsgISShow = "N";
                        new JH_Auth_TLB().Update(tls[0]);
                        msg.ErrorMsg = "del";
                    }
                }
                else
                {
                    JH_Auth_TL Model = new JH_Auth_TL();
                    Model.CRDate     = DateTime.Now;
                    Model.CRUser     = UserInfo.User.UserName;
                    Model.CRUserName = UserInfo.User.UserRealName;
                    Model.ComId      = UserInfo.User.ComId;
                    Model.MSGTLYID   = P1;
                    Model.MSGType    = "TSSQ";
                    Model.MsgISShow  = "Y";
                    new JH_Auth_TLB().Insert(Model);
                    SZHL_TSSQ tssq = new SZHL_TSSQB().GetEntity(d => d.ID == id);
                    if (tssq.CRUser != UserInfo.User.UserName)
                    {
                        SZHL_TXSX CSTX = new SZHL_TXSX();
                        CSTX.Date           = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                        CSTX.APIName        = "TSSQ";
                        CSTX.ComId          = UserInfo.User.ComId;
                        CSTX.FunName        = "SENDZANMSG";
                        CSTX.CRUserRealName = UserInfo.User.UserRealName;
                        CSTX.MsgID          = P1;

                        CSTX.TXContent = "";
                        CSTX.ISCS      = "N";
                        CSTX.TXUser    = tssq.CRUser;
                        CSTX.TXMode    = Model.MSGType;
                        CSTX.CRUser    = UserInfo.User.UserName;

                        TXSX.TXSXAPI.AddALERT(CSTX); //时间为发送时间
                    }

                    msg.Result = Model;
                }
            }
        }
예제 #5
0
        /// <summary>
        /// 获取话题列表
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETHTLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string userName = UserInfo.User.UserName;

            int page      = 0;
            int pagecount = 8;

            int.TryParse(context.Request["p"] ?? "1", out page);              //页码
            int.TryParse(context.Request["pagecount"] ?? "8", out pagecount); //页数
            page = page == 0 ? 1 : page;
            int    recordCount = 0;
            string strWhere    = string.Format(" sq.ComId={0} ", UserInfo.User.ComId);
            string strContent  = context.Request["Content"] ?? "";

            strContent = strContent.TrimEnd();
            if (strContent != "")
            {
                strWhere += string.Format(" And ( sq.HTNR like '%{0}%' )", strContent);
            }

            string leibie = context.Request["lb"] ?? "";

            if (leibie != "")
            {
                strWhere += string.Format(" And sq.LeiBie='{0}' ", leibie);
            }

            int DataID = -1;

            int.TryParse(context.Request["ID"] ?? "-1", out DataID);//记录Id
            if (DataID != -1)
            {
                string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("TSSQ", DataID, UserInfo);
                if (strIsHasDataQX == "Y")
                {
                    strWhere += string.Format(" And sq.ID = '{0}'", DataID);
                }
            }
            if (P1 != "")
            {
                switch (P1)
                {
                case "0":
                {
                    //设置usercenter已读
                    new JH_Auth_User_CenterB().ReadMsg(UserInfo, DataID, "TSSQ");
                }
                break;

                case "1":     //我的
                {
                    strWhere += " And sq.CRUser='******'";
                }
                break;

                case "2":     //我评论过的
                {
                    //DataTable dtPL = new JH_Auth_TLB().GetDTByCommand(string.Format("SELECT tl.MSGTLYID  FROM JH_Auth_TL tl WHERE tl.MSGType='TSSQ' AND tl.MsgISShow <> 'Y' AND tl.CRUser='******'", UserInfo.User.UserName));
                    string htIDs = new JH_Auth_TLB().GetEntities(d => d.MSGType == "TSSQ" && d.CRUser == UserInfo.User.UserName && (d.MsgISShow != "Y" && d.MsgISShow != "N")).Select(d => d.MSGTLYID).ToList().ListTOString(',');
                    if (!string.IsNullOrWhiteSpace(htIDs))
                    {
                        strWhere += "And sq.ID IN (" + htIDs + ") ";
                    }
                    else
                    {
                        strWhere += "And sq.ID ='' ";
                    }
                }
                break;

                case "3":    //全部
                {
                    strWhere += " And (ISNULL(sq.CYR,'') = '' OR ','+sq.CYR+','  like '%," + userName + ",%' )";
                }
                break;
                }
                DataTable dt = new SZHL_TSSQB().GetDataPager(@" SZHL_TSSQ sq LEFT JOIN JH_Auth_ZiDian zd ON sq.LeiBie=zd.ID and Class=19", " sq.*,zd.TypeName ", pagecount, page, " sq.CRDate DESC ", strWhere, ref recordCount);

                #region 附件评论
                string Ids     = "";
                string fileIDs = "";
                foreach (DataRow row in dt.Rows)
                {
                    Ids += row["ID"].ToString() + ",";
                    if (!string.IsNullOrEmpty(row["Files"].ToString()))
                    {
                        fileIDs += row["Files"].ToString() + ",";
                    }
                }
                Ids     = Ids.TrimEnd(',');
                fileIDs = fileIDs.TrimEnd(',');
                if (Ids != "")
                {
                    List <FT_File> FileList = new List <FT_File>();
                    DataTable      dtPL     = new JH_Auth_TLB().GetDTByCommand(string.Format("SELECT tl.*  FROM JH_Auth_TL tl WHERE tl.MSGType='TSSQ' AND (ISNULL(tl.MsgISShow,'') <> 'Y' and ISNULL(tl.MsgISShow,'') <> 'N') AND  tl.MSGTLYID in ({0}) ORDER BY CRDate ASC", Ids));
                    DataTable      zandt    = new JH_Auth_TLB().GetDTByCommand(string.Format("SELECT tl.*  FROM JH_Auth_TL tl WHERE tl.MSGType='TSSQ' AND MsgISShow='Y' AND  tl.MSGTLYID in ({0})", Ids));
                    if (!string.IsNullOrEmpty(fileIDs))
                    {
                        int[] fileId = fileIDs.SplitTOInt(',');
                        FileList = new FT_FileB().GetEntities(d => fileId.Contains(d.ID)).ToList();
                    }
                    dt.Columns.Add("PLList", Type.GetType("System.Object"));
                    dt.Columns.Add("FileList", Type.GetType("System.Object"));
                    dt.Columns.Add("ZanList", Type.GetType("System.Object"));
                    dt.Columns.Add("IsZan", Type.GetType("System.Object"));
                    foreach (DataRow row in dt.Rows)
                    {
                        DataTable dtPLs = dtPL.FilterTable("MSGTLYID='" + row["ID"] + "'");
                        dtPLs.Columns.Add("FileList", Type.GetType("System.Object"));
                        foreach (DataRow dr in dtPLs.Rows)
                        {
                            if (dr["MSGisHasFiles"] != null && dr["MSGisHasFiles"].ToString() != "")
                            {
                                int[] fileIds = dr["MSGisHasFiles"].ToString().SplitTOInt(',');
                                dr["FileList"] = new FT_FileB().GetEntities(d => fileIds.Contains(d.ID));
                            }
                        }
                        row["PLList"]  = dtPLs;
                        row["ZanList"] = zandt.FilterTable("MSGTLYID='" + row["ID"] + "'");
                        row["IsZan"]   = zandt.FilterTable(" MSGTLYID='" + row["ID"] + "' and CRUser='******'").Rows.Count > 0 ? "Y" : "N";
                        if (FileList.Count > 0)
                        {
                            string[] fileIds = row["Files"].ToString().Split(',');
                            row["FileList"] = FileList.Where(d => fileIds.Contains(d.ID.ToString()));
                        }
                    }
                }
                #endregion

                msg.Result  = dt;
                msg.Result1 = recordCount;
            }
        }
예제 #6
0
        /// <summary>
        /// 会议详细信息
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETHYGLMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int    Id        = int.Parse(P1);
            string strWhere  = " 1=1 and hy.ComId=" + UserInfo.User.ComId + " and hy.ID=" + Id;
            string colNme    = @"hy.*,hys.Name ,dbo.fn_PDStatus(hy.intProcessStanceid) AS StateName,case when hy.StartTime>getdate() then '即将开始' when hy.StartTime<=getdate() and hy.EndTime>=getdate() then '正在进行' when hy.EndTime<getdate() then '已结束' end as HLStatus ";
            string tableName = string.Format(@" SZHL_HYGL hy left join SZHL_HYGL_ROOM hys on hy.RoomID=hys.ID");

            string    strSql = string.Format("Select {0}  From {1} where {2} order by hy.CRDate desc", colNme, tableName, strWhere);
            DataTable dt     = new SZHL_HYGLB().GetDTByCommand(strSql);


            msg.Result = dt;
            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["Files"] != null)
                {
                    string strfiles = dt.Rows[0]["Files"].ToString();
                    if (!string.IsNullOrEmpty(strfiles))
                    {
                        msg.Result1 = new FT_FileB().GetEntities(" ID in (" + strfiles + ")");
                    }
                }
                //msg.Result2 = new SZHL_HYGL_QRB().GetEntities(p => p.Status == "0" && p.HYID == model.ID && p.IsDel == 0);
                //msg.Result3 = new SZHL_HYGL_QDB().GetEntities(p => p.IsDel == 0 && p.HYID == model.ID);
                var strid = dt.Rows[0]["ID"].ToString();


                //打开会议即已阅
                //Msg_Result msg2 = new Msg_Result();
                //UPDATEHYQK(context, msg2, strid, "1", UserInfo);

                msg.Result2 = new JH_Auth_TLB().GetEntities(p => p.ComId == UserInfo.User.ComId && p.MSGType == "HYGL" && p.MSGTLYID == strid);

                var hysat = new JH_Auth_TLB().GetEntities(p => p.ComId == UserInfo.User.ComId && p.MSGType == "HYGL" && p.MSGTLYID == strid && p.CRUser == UserInfo.User.UserName && p.MsgISShow != null).OrderByDescending(p => p.CRDate).ToList();
                if (hysat.Count() > 0)
                {
                    string strs = string.Empty;
                    foreach (var l in hysat)
                    {
                        if (string.IsNullOrEmpty(strs))
                        {
                            strs = l.MsgISShow;
                        }
                        else
                        {
                            strs = strs + "," + l.MsgISShow;
                        }
                    }
                    msg.Result3 = strs;
                }
                if (dt.Rows[0]["JLFiles"] != null)
                {
                    string strjlfiles = dt.Rows[0]["JLFiles"].ToString();
                    if (!string.IsNullOrEmpty(strjlfiles))
                    {
                        msg.Result4 = new FT_FileB().GetEntities(" ID in (" + strjlfiles + ")");
                    }
                }

                //更新消息为已读状态
                new JH_Auth_User_CenterB().ReadMsg(UserInfo, Int32.Parse(strid), "HYGL");
            }
        }
예제 #7
0
        /// <summary>
        /// 会议列表
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETHYGLLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string userName = UserInfo.User.UserName;
            string strWhere = " 1=1 and hy.ComId=" + UserInfo.User.ComId;

            string leibie = context.Request["lb"] ?? "";

            if (leibie != "")
            {
                strWhere += string.Format(" And hy.RoomID='{0}' ", leibie);
            }
            string strContent = context.Request["Content"] ?? "";

            strContent = strContent.TrimEnd();
            if (strContent != "")
            {
                strWhere += string.Format(" And ( hy.Title like '%{0}%' )", strContent);
            }
            int DataID = -1;

            int.TryParse(context.Request["ID"] ?? "-1", out DataID);//记录Id
            if (DataID != -1)
            {
                string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("HYGL", DataID, UserInfo);
                if (strIsHasDataQX == "Y")
                {
                    strWhere += string.Format(" And hy.ID = '{0}'", DataID);
                }
            }

            if (P1 != "")
            {
                int page      = 0;
                int pagecount = 8;
                int.TryParse(context.Request["p"] ?? "1", out page);
                int.TryParse(context.Request["pagecount"] ?? "8", out pagecount);//页数
                page = page == 0 ? 1 : page;
                int total = 0;

                DataTable dt = new DataTable();

                #region no use
                //                switch (P1)
                //                {
                //                    case "0":
                //                        string colNme1 = @"ycgl.*,case when ycgl.StartTime>getdate() then '即将开始' when ycgl.StartTime<=getdate() and ycgl.EndTime>=getdate() then '正在进行'
                //                                            when ycgl.EndTime<getdate() then '已结束' end as HLStatus,car.Name ,case WHEN wfpi.isComplete is null and wfpi.IsCanceled is null  THEN '正在审批'
                //                                            when wfpi.isComplete='Y' then '已审批'  WHEN wfpi.IsCanceled='Y' then '已退回' END as StateName";
                //                        //strWhere += " And cc.CRUser ='******'";
                //                        dt = new SZHL_CCXJB().GetDataPager("SZHL_HYGL ycgl inner join SZHL_HYGL_ROOM  car on ycgl.RoomID=car.ID  inner join  Yan_WF_PI wfpi  on ycgl.intProcessStanceid=wfpi.ID", colNme1, 8, page, " ycgl.CRDate desc", strWhere, ref total);
                //                        break;
                //                    case "1":
                //                        string colNme = @"ycgl.*,case when ycgl.StartTime>getdate() then '即将开始' when ycgl.StartTime<=getdate() and ycgl.EndTime>=getdate() then '正在进行'
                //                                            when ycgl.EndTime<getdate() then '已结束' end as HLStatus,car.Name ,case WHEN wfpi.isComplete is null and wfpi.IsCanceled is null  THEN '正在审批'
                //                                            when wfpi.isComplete='Y' then '已审批'  WHEN wfpi.IsCanceled='Y' then '已退回' END as StateName";
                //                        strWhere += " And ycgl.CRUser ='******'";
                //                        dt = new SZHL_CCXJB().GetDataPager("SZHL_HYGL ycgl inner join SZHL_HYGL_ROOM  car on ycgl.RoomID=car.ID  inner join  Yan_WF_PI wfpi  on ycgl.intProcessStanceid=wfpi.ID", colNme, 8, page, " ycgl.CRDate desc", strWhere, ref total);

                //                        break;
                //                    case "2":
                //                        string colNme2 = @"ycgl.*,case when ycgl.StartTime>getdate() then '即将开始' when ycgl.StartTime<=getdate() and ycgl.EndTime>=getdate() then '正在进行'
                //                                            when ycgl.EndTime<getdate() then '已结束' end as HLStatus,car.Name ,'已审批' StateName";
                //                        strWhere += string.Format(" And (','+ycgl.CYUser+','  like '%,{0},%' or ','+ycgl.JLUser+','  like '%,{0},%' or ','+ycgl.ZCUser+','  like '%,{0},%' or ','+ycgl.SXUser+','  like '%,{0},%'  ) and wfpi.isComplete='Y'", userName);
                //                        dt = new SZHL_CCXJB().GetDataPager("SZHL_HYGL ycgl inner join SZHL_HYGL_ROOM  car on ycgl.RoomID=car.ID  inner join  Yan_WF_PI wfpi  on ycgl.intProcessStanceid=wfpi.ID", colNme2, 8, page, " ycgl.StartTime desc", strWhere, ref total);

                //                        break;
                //                    case "3":
                //                        List<string> intProD = new Yan_WF_PIB().GetDSH(UserInfo.User).Select(d => d.PIID.ToString()).ToList();
                //                        if (intProD.Count > 0)
                //                        {
                //                            string tableNameD = string.Format(@" SZHL_HYGL ycgl inner join SZHL_HYGL_ROOM  car on ycgl.RoomID=car.ID");
                //                            string tableColumnD = "ycgl.* ,car.Name , '正在审批' StateName,case when ycgl.StartTime>getdate() then '即将开始' when ycgl.StartTime<=getdate() and ycgl.EndTime>=getdate() then '正在进行' when ycgl.EndTime<getdate() then '已结束' end as HLStatus";
                //                            strWhere += " And ycgl.intProcessStanceid in (" + (intProD.ListTOString(',') == "" ? "0" : intProD.ListTOString(',')) + ")";
                //                            dt = new SZHL_CCXJB().GetDataPager(tableNameD, tableColumnD, 8, page, " ycgl.CRDate desc", strWhere, ref total);
                //                        }
                //                        break;
                //                    case "4":
                //                        List<Yan_WF_TI> ListData = new Yan_WF_TIB().GetEntities("TaskUserID ='" + UserInfo.User.UserName + "' AND EndTime IS NOT NULL AND TaskUserView!='发起表单'").ToList();
                //                        List<string> intPro = ListData.Select(d => d.PIID.ToString()).ToList();
                //                        string tableName = string.Format(@" SZHL_HYGL ycgl inner join SZHL_HYGL_ROOM  car on ycgl.RoomID=car.ID inner join  Yan_WF_PI wfpi  on ycgl.intProcessStanceid=wfpi.ID");
                //                        string tableColumn = "ycgl.* ,car.Name ,  case when wfpi.IsCanceled is null then '已审批'   WHEN wfpi.IsCanceled='Y' then '已退回' END StateName,case when ycgl.StartTime>getdate() then '即将开始' when ycgl.StartTime<=getdate() and ycgl.EndTime>=getdate() then '正在进行' when ycgl.EndTime<getdate() then '已结束' end as HLStatus ";
                //                        strWhere += "  And ycgl.intProcessStanceid in (" + (intPro.ListTOString(',') == "" ? "0" : intPro.ListTOString(',')) + ")";

                //                        dt = new SZHL_CCXJB().GetDataPager(tableName, tableColumn, 8, page, " ycgl.CRDate desc", strWhere, ref total);
                //                        break;
                //                }
                #endregion

                switch (P1)
                {
                case "0":     //手机单条数据
                {
                    //设置usercenter已读
                    new JH_Auth_User_CenterB().ReadMsg(UserInfo, DataID, "HYGL");
                }
                break;

                case "1":     //创建的
                {
                    strWhere += " And hy.CRUser ='******'";
                }
                break;

                case "2":     //参与的
                {
                    strWhere += string.Format(" And (','+hy.CYUser+','  like '%,{0},%' or ','+hy.JLUser+','  like '%,{0},%' or ','+hy.ZCUser+','  like '%,{0},%' or ','+hy.SXUser+','  like '%,{0},%'  ) and ( dbo.fn_PDStatus(hy.intProcessStanceid)='已审批' or dbo.fn_PDStatus(hy.intProcessStanceid)='-1')", userName);
                }
                break;

                case "3":     //待审核
                {
                    var intProD = new Yan_WF_PIB().GetDSH(UserInfo.User).Select(d => d.PIID.ToString()).ToList();
                    if (intProD.Count > 0)
                    {
                        strWhere += " And hy.intProcessStanceid in (" + (intProD.ListTOString(',') == "" ? "0" : intProD.ListTOString(',')) + ")";
                    }
                    else
                    {
                        strWhere += " And 1=0";
                    }
                }
                break;

                case "4":      //已审核
                {
                    var intProD = new Yan_WF_PIB().GetYSH(UserInfo.User).Select(d => d.PIID.ToString()).ToList();
                    if (intProD.Count > 0)
                    {
                        strWhere += " And hy.intProcessStanceid in (" + (intProD.ListTOString(',') == "" ? "0" : intProD.ListTOString(',')) + ")";
                    }
                    else
                    {
                        strWhere += " And 1=0";
                    }
                }
                break;
                }

                dt = new SZHL_CCXJB().GetDataPager("SZHL_HYGL hy left join SZHL_HYGL_ROOM hys on hy.RoomID=hys.ID", "hy.*,hys.Name ,dbo.fn_PDStatus(hy.intProcessStanceid) AS StateName,case when hy.StartTime>getdate() then '即将开始' when hy.StartTime<=getdate() and hy.EndTime>=getdate() then '正在进行' when hy.EndTime<getdate() then '已结束' end as HLStatus ", pagecount, page, " hy.CRDate desc", strWhere, ref total);

                if (dt.Rows.Count > 0)
                {
                    dt.Columns.Add("RYStatus", Type.GetType("System.String"));
                    dt.Columns.Add("FileList", Type.GetType("System.Object"));
                    dt.Columns.Add("PLList", Type.GetType("System.Object"));
                    foreach (DataRow dr in dt.Rows)
                    {
                        if (dr["Files"] != null && dr["Files"].ToString() != "")
                        {
                            dr["FileList"] = new FT_FileB().GetEntities(" ID in (" + dr["Files"].ToString() + ")");
                        }
                        string strid = dr["ID"].ToString();
                        var    hysat = new JH_Auth_TLB().GetEntities(p => p.ComId == UserInfo.User.ComId && p.MSGType == "HYGL" && p.MSGTLYID == strid && p.CRUser == UserInfo.User.UserName && p.MsgISShow != null).OrderByDescending(p => p.CRDate).ToList();
                        if (hysat.Count() > 0)
                        {
                            string strs = string.Empty;
                            foreach (var l in hysat)
                            {
                                if (string.IsNullOrEmpty(strs))
                                {
                                    strs = l.MsgISShow;
                                }
                                else
                                {
                                    strs = strs + "," + l.MsgISShow;
                                }
                            }
                            dr["RYStatus"] = strs;
                        }

                        dr["PLList"] = new JH_Auth_TLB().GetEntities(p => p.ComId == UserInfo.User.ComId && p.MSGType == "HYGL" && p.MSGTLYID == strid);
                    }
                }
                msg.Result  = dt;
                msg.Result1 = total;
            }
        }
예제 #8
0
파일: GZBGManage.cs 프로젝트: jaysue/zyweb
        /// <summary>
        /// 获取日志列表
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">日志类型</param>
        /// <param name="P2">查询条件</param>
        /// <param name="strUserName"></param>
        public void GETGZBGLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int DataID = -1;

            int.TryParse(context.Request["ID"] ?? "-1", out DataID);//微信获取单个数据的ID


            int page      = 0;
            int pagecount = 8;

            int.TryParse(context.Request["p"] ?? "1", out page);              //页码
            int.TryParse(context.Request["pagecount"] ?? "8", out pagecount); //页数
            page = page == 0 ? 1 : page;
            int    recordCount = 0;
            string strWhere    = string.Format(" bg.ComId={0} ", UserInfo.User.ComId);
            string type        = context.Request["type"] ?? "1";

            if (type == "2")//下属报告
            {
                //获取当前登录人负责的下属人员
                string Users = new JH_Auth_UserB().GetUserBranchUsers(UserInfo.User.ComId.Value, UserInfo.User.UserName).Select(d => d.UserName).ToList().ListTOString(',');
                strWhere += string.Format("and   bg.CRUser in ('{0}')", Users.ToFormatLike());
            }
            else if (type == "1") //当前登录人报告
            {
                strWhere += string.Format("and   bg.CRUser='******'", UserInfo.User.UserName);
            }
            else if (type == "3")//获取抄送人报告
            {
                strWhere += string.Format("and    ','+bg.ChaoSongUser+',' like '%{0}%'", UserInfo.User.UserName);
            }

            if (P1 != "")//分类
            {
                strWhere += string.Format("And  bg.LeiBie={0}", P1);
            }
            if (P2 != "")//内容查询
            {
                strWhere += string.Format(" And (bg.RBContent like '%{0}%' OR bg.CRUserName like '%{0}%' OR bg.BranchName like '%{0}%' )", P2);
            }
            //根据创建时间查询
            string time = context.Request["time"] ?? "";

            if (time != "")
            {
                if (time == "1")   //近一周
                {
                    strWhere += string.Format(" And datediff(day,bg.RBDate,getdate())<7");
                }
                else if (time == "2")
                {  //近一月
                    strWhere += string.Format(" And datediff(day,bg.RBDate,getdate())<30");
                }
                else if (time == "3")  //自定义时间
                {
                    string strTime = context.Request["starTime"] ?? "";
                    string endTime = context.Request["endTime"] ?? "";
                    if (strTime != "")
                    {
                        strWhere += string.Format(" And convert(varchar(10),bg.RBDate,120) >='{0}'", strTime);
                    }
                    if (endTime != "")
                    {
                        strWhere += string.Format(" And convert(varchar(10),bg.RBDate,120) <='{0}'", endTime);
                    }
                }
            }
            if (DataID != -1)
            {
                string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("GZBG", DataID, UserInfo);
                if (strIsHasDataQX == "Y")
                {
                    strWhere += string.Format(" And bg.ID = '{0}'", DataID);
                }
                //更新消息为已读状态
                new JH_Auth_User_CenterB().ReadMsg(UserInfo, DataID, "GZBG");
            }
            DataTable dt      = new SZHL_GZBGB().GetDataPager(" SZHL_GZBG  bg inner join JH_Auth_ZiDian zd on LeiBie= zd.ID and Class=6  ", "bg.BranchName,bg.CRUserName,CONVERT(varchar(100), bg.RBDate, 23) as RBDate,zd.TypeName,bg.CRUser,bg.RBContent,bg.RBJSR,bg.RBWCQK,bg.LeiBie,bg.CRDate,bg.ID,bg.Files ", pagecount, page, "bg.CRDate desc", strWhere, ref recordCount);
            string    Ids     = "";
            string    fileIDs = "";

            foreach (DataRow row in dt.Rows)
            {
                Ids += row["ID"].ToString() + ",";
                if (!string.IsNullOrEmpty(row["Files"].ToString()))
                {
                    fileIDs += row["Files"].ToString() + ",";
                }
            }
            Ids     = Ids.TrimEnd(',');
            fileIDs = fileIDs.TrimEnd(',');

            dt.Columns.Add("PLList", Type.GetType("System.Object"));
            dt.Columns.Add("FileList", Type.GetType("System.Object"));
            if (Ids != "")
            {
                List <FT_File> FileList = new List <FT_File>();
                DataTable      dtPL     = new JH_Auth_TLB().GetDTByCommand(string.Format("SELECT tl.* FROM JH_Auth_TL tl WHERE tl.MSGType='GZBG' AND  tl.MSGTLYID in ({0})", Ids));
                dtPL.Columns.Add("FileList", Type.GetType("System.Object"));
                foreach (DataRow dr in dtPL.Rows)
                {
                    if (dr["MSGisHasFiles"] != null && dr["MSGisHasFiles"].ToString() != "")
                    {
                        int[] fileIds = dr["MSGisHasFiles"].ToString().SplitTOInt(',');
                        dr["FileList"] = new FT_FileB().GetEntities(d => fileIds.Contains(d.ID));
                    }
                }

                if (!string.IsNullOrEmpty(fileIDs))
                {
                    int[] fileId = fileIDs.SplitTOInt(',');
                    FileList = new FT_FileB().GetEntities(d => fileId.Contains(d.ID)).ToList();
                }
                foreach (DataRow row in dt.Rows)
                {
                    row["PLList"] = dtPL.FilterTable("MSGTLYID='" + row["ID"] + "'");
                    if (FileList.Count > 0)
                    {
                        string[] fileIds = row["Files"].ToString().Split(',');
                        row["FileList"] = FileList.Where(d => fileIds.Contains(d.ID.ToString()));
                    }
                }
            }
            msg.Result  = dt;
            msg.Result1 = recordCount;
        }
예제 #9
0
파일: QYHDManage.cs 프로젝트: jaysue/zyweb
        /// <summary>
        /// 活动列表
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETQYHDLIST_PAGE(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int DataID = -1;

            int.TryParse(context.Request["ID"] ?? "-1", out DataID);//获取单个数据的ID



            int listType = 0;

            int.TryParse(context.Request["listType"] ?? "0", out listType);
            string strWhere = "ComId=" + UserInfo.User.ComId + " AND (CYR='' OR CYR like '%" + UserInfo.User.UserName + "%' OR  CRUser='******')";

            if (listType == 1)
            {
                strWhere = "ComId=" + UserInfo.User.ComId + " And CRUser='******'";
            }

            if (P1 == "0")
            {
                strWhere += string.Format(" And Type = 0 ");
            }
            else if (P1 == "1")
            {
                strWhere += string.Format(" And Type=1 ");
            }

            if (P2 != "")
            {
                strWhere += string.Format(" And Title like '%{0}%' ", P2);
            }

            if (DataID != -1)
            {
                string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("QYHD", DataID, UserInfo);
                if (strIsHasDataQX == "Y")
                {
                    strWhere += string.Format(" And ID = '{0}'", DataID);
                }
                //更新消息为已读状态
                new JH_Auth_User_CenterB().ReadMsg(UserInfo, DataID, "QYHD");
            }
            int page      = 0;
            int pagecount = 8;

            int.TryParse(context.Request["p"] ?? "1", out page);
            int.TryParse(context.Request["pagecount"] ?? "8", out pagecount);//页数
            int recordCount = 0;
            //HDStatus 0已结束  2 正在进行  1 未开始
            string    strSql = @"SELECT qyhd.ID,qyhd.Type,qyhd.FQF,qyhd.Title,qyhd.JZDate,qyhd.HDDate,qyhd.Status,qyhd.CRDate,qyhd.Files,qyhd.CRUser,qyhd.ComId,qyhd.CYR,qyhd.StartTime,qyhd.EndTime,qyhd.HD_Content,qyhd.HD_Adress,qyhd.TP_IsNM,TP_Type,TP_IsPublic,qyhd.IsPublic,COUNT(result.ID) BMCount ,SUM(case when result.CRUser='******' then 1 else 0 end ) UserBMCount,
                                case when StartTime>GETDATE() then 1 when EndTime>GETDATE() and StartTime<GETDATE() then 2  when EndTime<GETDATE() then 0 End HDStatus
                                from SZHL_QYHDN qyhd left join SZHL_QYHD_Result result on  qyhd.Id=result.HDID 
                                group by qyhd.ID,qyhd.Type,qyhd.FQF,qyhd.Title,qyhd.JZDate,qyhd.HDDate,qyhd.Status,qyhd.Files,qyhd.CRDate,qyhd.CRUser,qyhd.ComId,qyhd.CYR,qyhd.StartTime,qyhd.EndTime,qyhd.HD_Content,qyhd.HD_Adress,qyhd.TP_IsNM,TP_Type,TP_IsPublic,qyhd.IsPublic";
            DataTable dt     = new SZHL_QYHDNB().GetDataPager("(" + strSql + ") newTab  ", "*", pagecount, page, "HDStatus desc,CRDate desc", strWhere, ref recordCount);

            string Ids       = "";
            string fileIDs   = "";
            string BMIDs     = ""; //报名列表
            string TPItemIds = ""; //投票选项

            #region 附件,评论列表
            foreach (DataRow row in dt.Rows)
            {
                Ids += row["ID"].ToString() + ",";
                if (!string.IsNullOrEmpty(row["Files"].ToString()))
                {
                    fileIDs += row["Files"].ToString() + ",";
                }
                if (row["Type"].ToString() == "0")
                {
                    BMIDs += row["ID"].ToString() + ",";
                }
                else
                {
                    TPItemIds += row["ID"].ToString() + ",";
                }
            }
            Ids       = Ids.TrimEnd(',');
            fileIDs   = fileIDs.TrimEnd(',');
            BMIDs     = BMIDs.TrimEnd(',');
            TPItemIds = TPItemIds.TrimEnd(',');
            if (Ids != "")
            {
                List <FT_File> FileList = new List <FT_File>();
                DataTable      dtPL     = new JH_Auth_TLB().GetDTByCommand(string.Format("SELECT * FROM JH_Auth_TL tl WHERE tl.MSGType='QYHD' AND  tl.MSGTLYID in ({0})", Ids));
                if (!string.IsNullOrEmpty(fileIDs))
                {
                    int[] fileId = fileIDs.SplitTOInt(',');
                    FileList = new FT_FileB().GetEntities(d => fileId.Contains(d.ID)).ToList();
                }
                //报名列表
                List <SZHL_QYHD_Result> resultList = new List <SZHL_QYHD_Result>();
                if (BMIDs != "")
                {
                    int[] HDIds = BMIDs.SplitTOInt(',');
                    resultList = new SZHL_QYHD_ResultB().GetEntities(d => HDIds.Contains(d.HDID.Value) && d.ComId == UserInfo.User.ComId).ToList();
                }
                //投票选项
                DataTable dtOption = new DataTable();
                if (TPItemIds != "")
                {
                    string strOpSql = string.Format(@"SELECT op.ID,op.OptionText,op.HDId,COUNT(result.ID) TPCount from SZHL_QYHD_Option op left join SZHL_QYHD_Result result on op.ID=result.OptionID  and op.HDId in ({0})
                                                GROUP by op.ID,op.OptionText,op.HDId", TPItemIds);
                    dtOption = new SZHL_QYHD_OptionB().GetDTByCommand(strOpSql);
                }
                dt.Columns.Add("PLList", Type.GetType("System.Object"));
                dt.Columns.Add("FileList", Type.GetType("System.Object"));
                dt.Columns.Add("BMList", Type.GetType("System.Object"));
                dt.Columns.Add("OptionList", Type.GetType("System.Object"));
                foreach (DataRow row in dt.Rows)
                {
                    int HDId = int.Parse(row["ID"].ToString());
                    row["BMList"] = resultList.Where(d => d.HDID == HDId);
                    //row["PLList"] = dtPL.FilterTable("MSGTLYID='" + row["ID"] + "'");
                    DataTable dtPLs = dtPL.FilterTable("MSGTLYID='" + row["ID"] + "'");
                    dtPLs.Columns.Add("FileList", Type.GetType("System.Object"));
                    foreach (DataRow dr in dtPLs.Rows)
                    {
                        if (dr["MSGisHasFiles"] != null && dr["MSGisHasFiles"].ToString() != "")
                        {
                            int[] fileIds = dr["MSGisHasFiles"].ToString().SplitTOInt(',');
                            dr["FileList"] = new FT_FileB().GetEntities(d => fileIds.Contains(d.ID));
                        }
                    }
                    row["PLList"] = dtPLs;
                    if (dtOption.Rows.Count > 0)
                    {
                        row["OptionList"] = dtOption.Where("HDId=" + row["ID"]);
                    }
                    if (FileList.Count > 0)
                    {
                        string[] fileIds = row["Files"].ToString().Split(',');
                        row["FileList"] = FileList.Where(d => fileIds.Contains(d.ID.ToString()));
                    }
                }
            }
            #endregion
            msg.Result  = dt;
            msg.Result1 = recordCount;
        }
예제 #10
0
파일: RWGLManage.cs 프로젝트: jaysue/zyweb
        public void GETRWGLLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string userName = UserInfo.User.UserName;
            string strWhere = " bg.ComId =" + UserInfo.User.ComId.Value;

            if (P1 != "")
            {
                if (P1 == "2")
                {
                    //  strWhere += string.Format(" And datediff(day,bg.RWJZDate,getdate())>0");
                    strWhere += string.Format(" And bg.RWJZDate < CONVERT(char(10), GETDATE(), 120) And RWStatus='0'");
                }
                else if (P1 == "1")
                {
                    strWhere += string.Format(" And RWStatus={0}", P1);
                }
                else if (P1 == "0")
                {
                    //strWhere += string.Format(" And bg.RWJZDate >= CONVERT(char(10), GETDATE(), 120) And RWStatus={0}", P1);
                    strWhere += string.Format(" And RWStatus={0}", P1);
                }
            }
            if (P2 != "")
            {
                switch (P2)
                {
                case "0":
                    strWhere += string.Format(" And (bg.CRUser='******' or  ','+RWFZR+','  like '%,{0},%'  or ','+RWCYR+','  like '%,{0},%'  or ','+KHFXRS+','  like '%,{0},%' )", userName);
                    break;

                case "1":
                    strWhere += string.Format(" And (','+RWFZR+','  like '%," + userName + ",%' )");
                    break;

                case "2":
                    strWhere += string.Format(" And bg.CRUser='******'", UserInfo.User.UserName);
                    break;

                case "3":
                    strWhere += string.Format(" And (','+RWCYR+','  like '%," + userName + ",%' )");
                    break;

                case "4":
                    strWhere += string.Format(" And (','+KHFXRS+','  like '%," + userName + ",%' )");
                    break;
                }
            }
            string leibie = context.Request["lb"] ?? "";

            if (leibie != "")
            {
                strWhere += string.Format(" And LeiBie='{0}' ", leibie);
            }
            string strContent = context.Request["Content"] ?? "";

            strContent = strContent.TrimEnd();
            if (strContent != "")
            {
                strWhere += string.Format(" And ( RWTitle like '%{0}%' )", strContent);
            }
            //根据时间查询数据
            string time = context.Request["time"] ?? "";

            if (time != "")
            {
                if (time == "1")   //近一周
                {
                    strWhere += string.Format(" And datediff(day,bg.CRDate,getdate())<7");
                }
                else if (time == "2")
                {  //近一月
                    strWhere += string.Format(" And datediff(day,bg.CRDate,getdate())<30");
                }
                else if (time == "3")  //自定义时间
                {
                    string strTime = context.Request["starTime"] ?? "";
                    string endTime = context.Request["endTime"] ?? "";
                    if (strTime != "")
                    {
                        strWhere += string.Format(" And convert(varchar(10),bg.CRDate,120) >='{0}'", strTime);
                    }
                    if (endTime != "")
                    {
                        strWhere += string.Format(" And convert(varchar(10),bg.CRDate,120) <='{0}'", endTime);
                    }
                }
            }
            int DataID = -1;

            int.TryParse(context.Request["ID"] ?? "-1", out DataID);//记录Id
            if (DataID != -1)
            {
                string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("RWGL", DataID, UserInfo);
                if (strIsHasDataQX == "Y")
                {
                    strWhere += string.Format(" And bg.ID = '{0}'", DataID);
                }
                //更新消息为已读状态
                new JH_Auth_User_CenterB().ReadMsg(UserInfo, DataID, "RWGL");
            }
            DataTable dtList    = new DataTable();
            int       page      = 0;
            int       pagecount = 8;

            int.TryParse(context.Request["p"] ?? "1", out page);              //页码
            int.TryParse(context.Request["pagecount"] ?? "8", out pagecount); //页数
            page = page == 0 ? 1 : page;
            int recordCount = 0;

            dtList = new SZHL_GZBGB().GetDataPager(" SZHL_RWGL  bg LEFT JOIN JH_Auth_ZiDian zd on LeiBie= zd.ID and Class=7  LEFT JOIN JH_Auth_User jau ON bg.RWFZR = jau.UserName AND jau.ComId=bg.ComId ", @" [CRUserName],
	jau.UserRealName,
	zd.TypeName,
	[RWJZDate],
	[RWTitle],
	[RWContent],
	[LeiBie],
	[RWFZR],
	[RWCYR],
	[RWStatus],
	[BiaoQian],
	[BeiZhu],
	[IsSend],
	[IsComPlete],
	[IsCancel],
	[CancelDate],
	bg.[CRDate],
	bg.[CRUser],
	bg.[Files],
	bg.[Remark],
	bg.[ID],
	[intProcessStanceid],
	[KHFXRS],
	[TopID],
	bg.[ComId],
	[TaskJD],
	[IsTX],CASE WHEN RWJZDate<CONVERT(char(20), GETDATE(), 23) THEN 1 else 0 END AS jzstatus"    , pagecount, page, "bg.RWJZDate desc", strWhere, ref recordCount);
            string Ids     = "";
            string fileIDs = "";

            foreach (DataRow row in dtList.Rows)
            {
                Ids += row["ID"].ToString() + ",";
                if (!string.IsNullOrEmpty(row["Files"].ToString()))
                {
                    fileIDs += row["Files"].ToString() + ",";
                }
            }
            Ids     = Ids.TrimEnd(',');
            fileIDs = fileIDs.TrimEnd(',');
            if (Ids != "")
            {
                List <FT_File> FileList = new List <FT_File>();
                DataTable      dtPL     = new JH_Auth_TLB().GetDTByCommand(string.Format("SELECT tl.* FROM JH_Auth_TL tl WHERE tl.MSGType='RWGL' AND  tl.MSGTLYID in ({0})", Ids));
                dtPL.Columns.Add("FileList", Type.GetType("System.Object"));
                foreach (DataRow dr in dtPL.Rows)
                {
                    if (dr["MSGisHasFiles"] != null && dr["MSGisHasFiles"].ToString() != "")
                    {
                        int[] fileIds = dr["MSGisHasFiles"].ToString().SplitTOInt(',');
                        dr["FileList"] = new FT_FileB().GetEntities(d => fileIds.Contains(d.ID));
                    }
                }


                if (!string.IsNullOrEmpty(fileIDs))
                {
                    int[] fileId = fileIDs.SplitTOInt(',');
                    FileList = new FT_FileB().GetEntities(d => fileId.Contains(d.ID)).ToList();
                }
                dtList.Columns.Add("PLList", Type.GetType("System.Object"));
                dtList.Columns.Add("FileList", Type.GetType("System.Object"));
                foreach (DataRow row in dtList.Rows)
                {
                    row["PLList"] = dtPL.FilterTable("MSGTLYID='" + row["ID"] + "'");
                    if (FileList.Count > 0)
                    {
                        string[] fileIds = row["Files"].ToString().Split(',');
                        row["FileList"] = FileList.Where(d => fileIds.Contains(d.ID.ToString()));
                    }
                }
            }
            msg.Result  = dtList;
            msg.Result1 = recordCount;
        }