示例#1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            ProductAddForm productAddFrm = new ProductAddForm(_unitService, _productService);

            productAddFrm.ShowDialog();
            UpdateList();
        }
示例#2
0
 private void btnUpdateProduct_Click(object sender, EventArgs e)
 {
     if (dtgProducts.SelectedRows.Count > 0)
     {
         var            product        = _productService.GetById((long)dtgProducts.SelectedRows[0].Cells[4].Value);
         ProductAddForm productAddForm = new ProductAddForm(_unitService, _productService, product);
         productAddForm.ShowDialog();
         UpdateList();
     }
 }