/// <summary> /// ADD NEW PRODUCT TO THE DATA BASE /// </summary> /// <param name="model"></param> public void AddNewProduct(ProductModel model) { try { model.ProductName = NewProductNametxt.Text; model.ProductID = NewProductIdtxt.Text; model.ProductQuantity = NewProductQuantitytxt.Text; model.ProductCostPrice = NewProductCostPricetxt.Text; model.ProductSellingPrice = NewProductSellingPricetxt.Text; model.ProductCategory = SelectedNewProductCategorycbx.Text; productController.AddProductToDataBase(model); MessageBox.Show("Product Added Successfully", "Save Product Server Response", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }