예제 #1
0
        private void BtnAddSale_Click(object sender, EventArgs e)
        {
            AddSaleInvoive m = new AddSaleInvoive(usrId, 0);

            try
            {
                m.btnAdd.Text = "Add New";
                m.ShowDialog();
                RefrechSales();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
 private void BtnUpdSale_Click(object sender, EventArgs e)
 {
     try
     {
         var            sellID = Convert.ToInt32(dgvSales.CurrentRow.Cells[0].Value);
         AddSaleInvoive m      = new AddSaleInvoive(usrId, sellID);
         m.txtLength.Text   = dgvSales.CurrentRow.Cells[1].Value.ToString();
         m.txtDiscount.Text = dgvSales.CurrentRow.Cells[4].Value.ToString();
         m.txtPrice.Text    = dgvSales.CurrentRow.Cells[3].Value.ToString();
         m.btnAdd.Text      = "Update";
         m.ShowDialog();
         RefrechSales();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }