예제 #1
0
 public void FillOrderList()
 {
     /*Insert into Order list*/
     foreach (GridViewRow gr in GridView1.Rows)
     {
         TextBox txtprice        = (TextBox)gr.FindControl("TxtPrice");
         TextBox txtquan         = (TextBox)gr.FindControl("TxtQuantity");
         TextBox txttot          = (TextBox)gr.FindControl("TxtTotal");
         Object  OrderItemInsert = new Object();
         OrderItemInsert.Order_Id = LblOrderid.Text;
         //OrderItemInsert.Email = TxteMail.Text;
         //OrderItemInsert.Mobile = TxtPhone.Text;
         //OrderItemInsert.Product_Name = gr.Cells[1].Text;
         //OrderItemInsert.Product_Quantity = gr.Cells[2].Text;
         //OrderItemInsert.Product_Brand = gr.Cells[3].Text;
         //OrderItemInsert.Product_Description = gr.Cells[4].Text;
         //OrderItemInsert.Product_Offer = gr.Cells[5].Text;
         OrderItemInsert.Product_Id = int.Parse(gr.Cells[6].Text);
         //OrderItemInsert.Product_Price = int.Parse(txtprice.Text);
         OrderItemInsert.Product_Unit = int.Parse(txtquan.Text);
         OrderItemInsert.Total_Price  = int.Parse(txttot.Text);
         OrderItemInsert.Year         = HiddenYear.Value;
         OrderItemInsert.Month        = HiddenMonth.Value;
         OrderItemInsert.Created_Date = HiddenDate.Value;
         BSLAYER.InsertOrderItem(OrderItemInsert);
     }
 }