예제 #1
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        DataTable ds1 = new DataTable();

        ds1 = (DataTable)Session["LeadListDS"];
        string strFilter = "";

        strFilter = strFilter + " LeadDate LIKE '%" + txtsearch.Text + "%' OR " +
                    " LeadNo LIKE '%" + txtsearch.Text + "%' OR " +
                    " CustomerName LIKE '%" + txtsearch.Text + "%' OR " +
                    "Phone1 LIKE '%" + txtsearch.Text + "%' OR " +
                    "Email LIKE '%" + txtsearch.Text + "%' OR ";
        //"LeadMobile LIKE '%" + txtsearch.Text + "%' OR " +
        //"LeadEmail LIKE '%" + txtsearch.Text + "%' OR " +
        //"FollowupDate1 LIKE '%" + txtsearch.Text + "%' OR " +
        //"Remark LIKE '%" + txtsearch.Text + "%' OR " +
        //"Convert(TotalAmount,'System.String') LIKE '" + txtsearch.Text + "%' OR " +
        //"Convert(NetAmount,'System.String') LIKE '" + txtsearch.Text + "%' OR ";

        strFilter = strFilter.Substring(0, strFilter.Length - 3);

        DV                    = ds1.DefaultView;
        DV.RowFilter          = strFilter;
        GvLeadList.DataSource = DV.Table;
        GvLeadList.DataBind();
    }
예제 #2
0
    public void bindLeadList()
    {
        List <ParaList> para = new List <ParaList>()
        {
            new ParaList {
                Key = "@i_CompId", Value = CurrentUser.CompId
            },
            new ParaList {
                Key = "@i_UserId", Value = CurrentUser.UserId
            },
        };


        ds = crmclient.list(para, "Lead");

        Session["LeadListDS"] = ds.Tables[0];
        if (ds.Tables[0].Rows.Count > 0)
        {
            GvLeadList.DataSource = ds.Tables[0];
            GvLeadList.DataBind();
        }
    }