protected void BtnViewOrder_Click(object sender, EventArgs e) { Button view = sender as Button; string orderID = view.CommandArgument; Team3Restaurant.ManagementSystem.OrderManagement OM = new Team3Restaurant.ManagementSystem.OrderManagement(); List <Team3Restaurant.ManagementSystem.OrderView> orderView = OM.GetOrderDetail(orderID); GVOrderDetail.DataSource = orderView; GVOrderDetail.DataBind(); }
protected void BtnChangeStatus_Click(object sender, EventArgs e) { Button order = sender as Button; string orderID = order.CommandArgument; string status = DLOrderStatus.SelectedValue; if (orderID == null) { return; } if (status.Equals("none")) { Response.Write("<script language='javascript'>window.alert('Please Select the Right Status!');</script>"); return; } Team3Restaurant.ManagementSystem.OrderManagement OM = new Team3Restaurant.ManagementSystem.OrderManagement(); OM.ChangeStatus(orderID, status); DLOrderStatus.SelectedValue = "none"; GVOrderList.DataBind(); }