private void BTNSAVEDATA_Click(object sender, EventArgs e)
        {
            //try
            //{
            DataTable orderDet = new DataTable();

            orderDet.Columns.Add("P_ID");
            orderDet.Columns.Add("Qty");
            orderDet.Columns.Add("P_Price");

            for (int i = 0; i < grid_sales.Rows.Count; i++)
            {
                orderDet.Rows.Add(grid_sales.Rows[i].Cells[0].Value,
                                  grid_sales.Rows[i].Cells[3].Value,
                                  grid_sales.Rows[i].Cells[2].Value);
            }
            CLASS_ORDER.sp_Order_Insert(ReqDate.Value, TXTTOTAL.Text, int.Parse(TXT_ID.Text),
                                        TXT_sellerNAME.Text, orderDet);
            MessageBox.Show("success");

            BTNPRINT.Enabled    = BTNBUYPROCESS.Enabled = true;
            BTNSAVEDATA.Enabled = false;


            //}
            //catch(Exception ex)
            //{ MessageBox.Show(ex.Message); }
        }
예제 #2
0
 private void btn_display_Click(object sender, EventArgs e)
 {
     grid_request.DataSource = CLASS_ORDER.sp_Order_Select();
 }