コード例 #1
0
    protected void txtsearch_TextChanged(object sender, EventArgs e)
    {
        DataTable ds1 = new DataTable();

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


        strFilter = strFilter + " Code LIKE '%" + txtsearch.Text + "%' OR " +
                    " CustomerName LIKE '%" + txtsearch.Text + "%' OR " +
                    "ContactPerson LIKE '%" + txtsearch.Text + "%' OR " +
                    "QDate 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;
        GvQuotaion.DataSource = DV.Table;
        GvQuotaion.DataBind();
    }
コード例 #2
0
    public void bindQuotation()
    {
        List <ParaList> para = new List <ParaList>()
        {
            new ParaList {
                Key = "@i_CompId", Value = CurrentUser.CompId.ToString()
            },
            // new ParaList { Key = "@i_UserId", Value =CurrentUser.UserId },
        };


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

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