private void Show()
        {
            string sql = "";

            QuerySession.QueryGuestTrack QGuestTrack = new VAN_OA.QuerySession.QueryGuestTrack();


            if (txtGuestName.Text.Trim() != "")
            {
                sql += string.Format(" and GuestName like '%{0}%'", txtGuestName.Text.Trim());
                QGuestTrack.GuestName = txtGuestName.Text.Trim();
            }

//            sql += string.Format(@" and (TB_GuestTrack.id in (select allE_id from tb_EForm where proId =17 and state='通过')
//or TB_GuestTrack.id not in (select allE_id from tb_EForm where proId =17))");

            PagerDomain page = new PagerDomain();

            page.CurrentPageIndex = AspNetPager1.CurrentPageIndex;


            List <TB_GuestTrack> GuestTracks = this.GuestTrackSer.GetListArrayToPage(sql, page).OrderByDescending(t => t.Time).ToList();

            AspNetPager1.RecordCount = GuestTracks.Count;
            this.gvList.PageIndex    = AspNetPager1.CurrentPageIndex - 1;
            Session[Query]           = QGuestTrack;
            this.gvList.DataSource   = GuestTracks;
            this.gvList.DataBind();
        }
Example #2
0
        private void Show()
        {
            string sql = " 1=1 ";

            QuerySession.QueryGuestTrack QSupplierTrack = new VAN_OA.QuerySession.QueryGuestTrack();
            if (txtFrom.Text != "")
            {
                if (CommHelp.VerifesToDateTime(txtFrom.Text) == false)
                {
                    base.ClientScript.RegisterStartupScript(base.GetType(), null, "<script>alert('登记日期 格式错误!');</script>");
                    return;
                }
                sql += string.Format(" and Time>='{0} 00:00:00'", txtFrom.Text);
                QSupplierTrack.FromTime = txtFrom.Text;
            }

            if (txtTo.Text != "")
            {
                if (CommHelp.VerifesToDateTime(txtTo.Text) == false)
                {
                    base.ClientScript.RegisterStartupScript(base.GetType(), null, "<script>alert('登记日期 格式错误!');</script>");
                    return;
                }
                sql += string.Format(" and Time<='{0} 23:59:59'", txtTo.Text);
                QSupplierTrack.ToTime = txtTo.Text;
            }

            if (txtSupplierName.Text.Trim() != "")
            {
                if (cbPiPei.Checked == false)
                {
                    sql += string.Format(" and SupplierName like '%{0}%'", txtSupplierName.Text.Trim());
                }
                else
                {
                    sql += string.Format(" and SupplierName='{0}'", txtSupplierName.Text.Trim());
                }
                QSupplierTrack.GuestName = txtSupplierName.Text;
            }

            if (txtProNo.Text.Trim() != "")
            {
                if (CheckProNo(txtProNo.Text) == false)
                {
                    return;
                }
                sql += string.Format(" and ProNo like '%{0}%'", txtProNo.Text.Trim());
            }
            if (txtSupplieSimpeName.Text.Trim() != "")
            {
                sql += string.Format(" and SupplieSimpeName like '%{0}%'", txtSupplieSimpeName.Text.Trim());
            }
            if (txtPhone.Text != "")
            {
                sql += string.Format(" and Phone like '%{0}%'", txtPhone.Text);
            }
            if (txtLikeMan.Text != "")
            {
                sql += string.Format(" and LikeMan like '%{0}%'", txtLikeMan.Text);
            }

            if (ddlShow.Text != "-1")
            {
                sql += string.Format(" and IsUse={0} ", ddlShow.Text);
            }
            if (ddlSpecial.Text != "-1")
            {
                sql += string.Format(" and IsSpecial={0} ", ddlSpecial.Text);
            }
            if (ddlPeculiarity.Text != "全部")
            {
                sql += string.Format(" and Peculiarity='{0}'", ddlPeculiarity.Text);
            }
            sql += string.Format(@" and Status='通过' ");

            List <TB_SupplierInfo> SupplierTracks = this.supplierSer.GetListArray(sql);

            AspNetPager1.RecordCount = SupplierTracks.Count;
            this.gvList.PageIndex    = AspNetPager1.CurrentPageIndex - 1;
            Session[Query]           = QSupplierTrack;
            this.gvList.DataSource   = SupplierTracks;
            this.gvList.DataBind();
        }
Example #3
0
        private void Show()
        {
            string sql = " 1=1 ";

            QuerySession.QueryGuestTrack QGuestTrack = new VAN_OA.QuerySession.QueryGuestTrack();
            if (txtFrom.Text != "")
            {
                if (CommHelp.VerifesToDateTime(txtFrom.Text) == false)
                {
                    base.ClientScript.RegisterStartupScript(base.GetType(), null, "<script>alert('登记日期 格式错误!');</script>");
                    return;
                }
                sql += string.Format(" and Time>='{0} 00:00:00'", txtFrom.Text);
                QGuestTrack.FromTime = txtFrom.Text;
            }

            if (txtTo.Text != "")
            {
                if (CommHelp.VerifesToDateTime(txtTo.Text) == false)
                {
                    base.ClientScript.RegisterStartupScript(base.GetType(), null, "<script>alert('登记日期 格式错误!');</script>");
                    return;
                }
                sql += string.Format(" and Time<='{0} 23:59:59'", txtTo.Text);
                QGuestTrack.ToTime = txtTo.Text;
            }
            if (txtGuestName.Text.Trim() != "")
            {
                sql += string.Format(" and GuestName like '%{0}%'", txtGuestName.Text.Trim());
                QGuestTrack.GuestName = txtGuestName.Text.Trim();
            }

            if (ddlAE.Text != "" && ddlAE.Text != "0")
            {
                sql += string.Format(" and AE={0}", ddlAE.SelectedItem.Value);
                //QGuestTrack.Apper = txtLoginName.Text;
            }

            if (txtProNo.Text.Trim() != "")
            {
                if (CheckProNo(txtProNo.Text) == false)
                {
                    return;
                }
                sql += string.Format(" and ProNo like '%{0}%'", txtProNo.Text.Trim());
            }


            sql += string.Format(" and INSIDE={0}", Session["currentUserId"].ToString());

            sql += string.Format(@" and (TB_GuestTrack.id in (select allE_id from tb_EForm where proId in (
select pro_Id from A_ProInfo where pro_Type='客户联系跟踪表') and state='通过') or TB_GuestTrack.id not in (select allE_id from tb_EForm where proId in (
select pro_Id from A_ProInfo where pro_Type='客户联系跟踪表') ))");


            List <TB_GuestTrack> GuestTracks = this.GuestTrackSer.GetListArray(sql);

            AspNetPager1.RecordCount = GuestTracks.Count;
            this.gvList.PageIndex    = AspNetPager1.CurrentPageIndex - 1;
            Session[Query]           = QGuestTrack;
            this.gvList.DataSource   = GuestTracks;
            this.gvList.DataBind();
        }
Example #4
0
        private void Show()
        {
            GuestTypeBaseInfoService dal = new GuestTypeBaseInfoService();

            GetListArray  = dal.GetListArray("");
            allGuestTypes = GetListArray.Select(t => t.GuestType).ToList();


            GuestProBaseInfoService guestProDal = new GuestProBaseInfoService();

            GetGuestProListArray = guestProDal.GetListArray("");
            allGuestPros         = GetGuestProListArray.Select(t => t.GuestPro.ToString()).ToList();

            string sql = " 1=1 ";

            QuerySession.QueryGuestTrack QGuestTrack = new VAN_OA.QuerySession.QueryGuestTrack();
            if (txtFrom.Text != "")
            {
                if (CommHelp.VerifesToDateTime(txtFrom.Text) == false)
                {
                    base.ClientScript.RegisterStartupScript(base.GetType(), null, "<script>alert('登记日期 格式错误!');</script>");
                    return;
                }
                sql += string.Format(" and Time>='{0} 00:00:00'", txtFrom.Text);
                QGuestTrack.FromTime = txtFrom.Text;
            }

            if (txtTo.Text != "")
            {
                if (CommHelp.VerifesToDateTime(txtTo.Text) == false)
                {
                    base.ClientScript.RegisterStartupScript(base.GetType(), null, "<script>alert('登记日期 格式错误!');</script>");
                    return;
                }
                sql += string.Format(" and Time<='{0} 23:59:59'", txtTo.Text);
                QGuestTrack.ToTime = txtTo.Text;
            }

            if (txtGuestName.Text.Trim() != "")
            {
                sql += string.Format(" and GuestName like '%{0}%'", txtGuestName.Text.Trim());
                QGuestTrack.GuestName = txtGuestName.Text.Trim();
            }


            if (ddlAE.Text != "" && ddlAE.Text != "0")
            {
                sql += string.Format(" and AE={0}", ddlAE.SelectedItem.Value);
                //QGuestTrack.Apper = txtLoginName.Text;
            }

            if (ddlINSIDE.Text != "" && ddlINSIDE.Text != "0")
            {
                sql += string.Format(" and INSIDE={0}", ddlINSIDE.SelectedItem.Value);
                //QGuestTrack.Apper = txtLoginName.Text;
            }


            if (txtProNo.Text.Trim() != "")
            {
                if (CheckProNo(txtProNo.Text) == false)
                {
                    return;
                }
                sql += string.Format(" and ProNo like '%{0}%'", txtProNo.Text.Trim());
            }
            if (ddlJidu.Text != "")
            {
                sql += string.Format(" and QuartNo='{1}' and YearNo='{0}' ", ddlSelectYears.Text, ddlJidu.Text);
            }
            if (ddlSpecial.Text != "-1")
            {
                sql += string.Format(" and IsSpecial ={0}", ddlSpecial.Text);
            }
            if (ddlGuestTypeList.Text != "-1")
            {
                sql += string.Format(" and MyGuestType ='{0}'", ddlGuestTypeList.Text);
            }
            if (ddlGuestProList.Text != "-1")
            {
                sql += string.Format(" and MyGuestPro like '%{0}%'", ddlGuestProList.Text);
            }
            if (txtPhone.Text != "")
            {
                sql += string.Format(" and Phone like '%{0}%'", txtPhone.Text);
            }
            if (txtLikeMan.Text != "")
            {
                sql += string.Format(" and LikeMan like '%{0}%'", txtLikeMan.Text);
            }
            sql += string.Format(@" and (TB_GuestTrack.id in (select allE_id from tb_EForm where proId in (
select pro_Id from A_ProInfo where pro_Type='客户联系跟踪表') and state='通过') or TB_GuestTrack.id not in (select allE_id from tb_EForm where proId in (
select pro_Id from A_ProInfo where pro_Type='客户联系跟踪表') ))");

            List <TB_GuestTrack> GuestTracks = this.GuestTrackSer.GetListArrayGuilei(sql, dllAddGuest.Text, ddlDiffMyGuestType.Text, dllDiffMyGuestPro.Text,
                                                                                     ddlSelectYears.Text, ddlJidu.Text);

            AspNetPager1.RecordCount = GuestTracks.Count;
            this.gvList.PageIndex    = AspNetPager1.CurrentPageIndex - 1;
            Session[Query]           = QGuestTrack;
            this.gvList.DataSource   = GuestTracks;
            this.gvList.DataBind();
        }