protected void Button7_Click(object sender, EventArgs e) { Order c = new Order(); c.OrderID = int.Parse(GridView2.SelectedRow.Cells[1].Text); c.DeleteOrder(); UpdateGrid(); }
protected void Button6_Click(object sender, EventArgs e) { Order b = new Order(); b.OrderStatus = "On Hold"; b.OrderID = int.Parse(GridView2.SelectedRow.Cells[1].Text); b.ChangeOrderStatus(); UpdateGrid(); }
void UpdateGrid() { Product a = new Product(); GridView1.DataSource = a.GetProduct2(); GridView1.DataBind(); Order b = new Order(); GridView2.DataSource = b.GetOrders(); GridView2.DataBind(); }
void UpdateGrid() { Product a = new Product(); GridView1.DataSource = a.GetProduct2(); GridView1.DataBind(); Order b = new Order(); b.Username = Session["Name"].ToString(); GridView2.DataSource = b.GetOrders2(); GridView2.DataBind(); }
protected void Button6_Click(object sender, EventArgs e) { Order b = new Order(); b.ProductName = GridView1.SelectedRow.Cells[1].Text; b.Quantity = int.Parse(TextBox3.Text); b.Contact = TextBox4.Text; b.Address = TextBox5.Text; b.OrderID = int.Parse(GridView2.SelectedRow.Cells[1].Text); b.EditOrder(); UpdateGrid(); }
protected void Button5_Click(object sender, EventArgs e) { Order a = new Order(); a.ProductName = GridView1.SelectedRow.Cells[1].Text; a.Quantity = int.Parse(TextBox3.Text); a.OrderStatus = "Pending"; a.Contact = TextBox4.Text; a.Address = TextBox5.Text; a.Username = Session["Name"].ToString(); a.AddOrder(); UpdateGrid(); }