Example #1
0
 private void btnProductAdd_Click(object sender, EventArgs e)
 {
     try
     {
         frmProductAdd ProductAdd = new frmProductAdd();
         ProductAdd.ShowDialog();
         Products = BusinessModel.ProductOperations.LoadProducts();
     }
     catch (Exception ex)
     {
         BusinessModel.Log.Logger(ex);
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (dtgridproductlist.SelectedCells.Count == 0 && dtgridproductlist.SelectedRows.Count == 0)
         {
             MessageBox.Show("Please select the product first");
         }
         else
         {
             int           index      = dtgridproductlist.CurrentCell.RowIndex;
             int           ProductId  = Convert.ToInt32(dtgridproductlist.Rows[index].Cells[6].Value.ToString());
             frmProductAdd ProductAdd = new frmProductAdd(ProductId);
             ProductAdd.ShowDialog();
             LoadProducts();
         }
     }
     catch (Exception ex)
     {
         BusinessModel.Log.Logger(ex);
     }
 }
Example #3
0
        private void productAddToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmProductAdd obj = new frmProductAdd();

            obj.ShowDialog();
        }