コード例 #1
0
 protected void Button7_Click(object sender, EventArgs e)
 {
     Order c = new Order();
     c.OrderID = int.Parse(GridView2.SelectedRow.Cells[1].Text);
     c.DeleteOrder();
     UpdateGrid();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
        void UpdateGrid()
        {
            Product a = new Product();
            GridView1.DataSource = a.GetProduct2();
            GridView1.DataBind();

            Order b = new Order();
            GridView2.DataSource = b.GetOrders();
            GridView2.DataBind();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
 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();
 }
コード例 #6
0
 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();
 }