Пример #1
0
 private void FillCustomerGridView()
 {
     if (Session["UserID"] != null)
     {
         CustomerBAL balCustomer = new CustomerBAL();
         DataTable   dtCustomer  = balCustomer.SelectAll();
         if (dtCustomer != null && dtCustomer.Rows.Count > 0)
         {
             gvCustomer.DataSource = dtCustomer;
             gvCustomer.DataBind();
         }
     }
 }
    private void FillCustomerGridView(SqlInt32 UserID)
    {
        CustomerBAL balCustomer = new CustomerBAL();

        DataTable dtCustomer = balCustomer.SelectAll(UserID);

        if (dtCustomer != null && dtCustomer.Rows.Count > 0)
        {
            gvCustomer.DataSource = dtCustomer;
            gvCustomer.DataBind();
            lblMessage.Text = "No Of Record : " + dtCustomer.Rows.Count.ToString();
        }
        else
        {
            lblMessage.Text = "No Data Here";
        }
    }