private void BindGridViewOrderStatus() { GridViewOrderStatus.DataSource = Connection.dbTable("SELECT * FROM clients_order WHERE ordered_by='" + Session["userName"].ToString() + "' AND status='Completed'"); GridViewOrderStatus.DataBind(); int rowCount = GridViewOrderStatus.Rows.Count; if (rowCount < 1) { nothingTodisplay.Text = "No Order History."; HyperLinkShopNow.Visible = true; } }
private void BindGridViewOrderStatus() { GridViewOrderStatus.DataSource = Connection.dbTable("SELECT * FROM clients_order WHERE ordered_by='" + Session["userName"].ToString() + "' AND date BETWEEN DATE(NOW()) - INTERVAL 14 DAY AND DATE(NOW())"); GridViewOrderStatus.DataBind(); int rowCount = GridViewOrderStatus.Rows.Count; if (rowCount < 1) { nothingTodisplay.Text = "No Pending Orders."; HyperLinkShopNow.Visible = true; } }