protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //GridViewOrdering_1 DataTable dt = new DataTable(); dt.Columns.Add("Item"); dt.Columns.Add("Product_ID"); dt.Columns.Add("Product_Name"); dt.Columns.Add("Unit_of_item"); dt.Columns.Add("PricePerUnit"); dt.Columns.Add("Stock_on_hand"); dt.Columns.Add("Quantity"); dt.Rows.Add("Merge", "180 CC.", "", "", "", ""); dt.Rows.Add("1", "10001", "PM 180 โกลด์ แอดวานซ์จืด", "ขวด", "15.89", "100", "100"); dt.Rows.Add("2", "10001", "PM 180 โกลด์ แอดวานซ์น้ำผึ้ง", "ขวด", "15.89", "100", "100"); dt.Rows.Add("Merge", "200 CC.", "", "", "", "", ""); dt.Rows.Add("1", "10001", "PM 200 เมล่อนญี่ปุ่น", " ขวด", "15.89", "100", "100"); dt.Rows.Add("2", "10001", "PM 200 เมล่อนญี่ปุ่น", " ขวด", "15.89", "100", "100"); dt.Rows.Add("3", "10001", "PM 200 เมล่อนญี่ปุ่น", " ขวด", "15.89", "100", "100"); dt.Rows.Add("4", "10001", "PM 200 เมล่อนญี่ปุ่น", " ขวด", "15.89", "100", "100"); Session["DataTable"] = dt; GridViewOrdering_1.DataSource = dt; GridViewOrdering_1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = new DataTable(); dt.Columns.Add("Debt_ID"); dt.Columns.Add("SP_ID"); dt.Columns.Add("Debt_Date"); dt.Columns.Add("Debt_Amount"); dt.Columns.Add("Total_Payment_Amount"); dt.Columns.Add("Balance_Outstanding_Amount"); dt.Rows.Add("C000001", "sale 1", "20/02/2560", "10,000.00", "9,000.00", "1,000.00"); dt.Rows.Add("C000001", "sale 1", "20/03/2560", "10,000.00", "9,000.00", "1,000.00"); dt.Rows.Add("T1", "2,000.00", "", "", "", ""); dt.Rows.Add("C000002", "sale 2", "20/02/2560", "10,000.00", "9,000.00", "1,000.00"); dt.Rows.Add("C000002", "sale 2", "20/03/2560", "10,000.00", "9,000.00", "1,000.00"); dt.Rows.Add("T1", "2,000.00", "", "", "", ""); dt.Rows.Add("T2", "4,000.00", "", "", "", ""); Session["DataTable"] = dt; GridViewOrdering_1.DataSource = dt; GridViewOrdering_1.DataBind(); } }