Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <dbo_CreditClass> creditList = dbo_CreditDataClass.GetCredit();
         GridViewCredit.DataSource = creditList;
         GridViewCredit.DataBind();
     }
 }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("CustomerName");
            dt.Columns.Add("Credit_Date");
            dt.Columns.Add("Credit_Amount");
            dt.Columns.Add("Status");


            dt.Rows.Add("ลูกค้า 1", "24/04/2560", "1000.00", "Active");
            dt.Rows.Add("ลูกค้า 1", "24/04/2560", "1000.00", "Active");

            GridViewCredit.DataSource = dt;
            GridViewCredit.DataBind();
        }
    }