Пример #1
0
 public AddProduct(ManageProductOrders O)
 {
     InitializeComponent();
     product = new Product();
     product.newProduct();
     CE     = new CheckEntry();
     M      = new WorkFlowMessage();
     Orders = O;
 }
Пример #2
0
 public AddProduct()
 {
     InitializeComponent();
     product = new Product();
     product.newProduct();
     CE = new CheckEntry();
     M  = new WorkFlowMessage();
     objDatabaseManager = new DatabaseManager();
     stockTable         = objDatabaseManager.SumStocks();
 }
Пример #3
0
        private void btn_UpdateProduct_Click(object sender, EventArgs e)
        {
            M = new WorkFlowMessage();

            //Set the product based on ID


            if (CE.isValidInt(txt_ProductID.Text, "ID") && CE.isnotNull(txt_ProductID.Text, "ID") && CE.isnotNull(txt_ProductName.Text, "Name") && CE.isnotNull(txt_ProductMaterials.Text, "Materials") && CE.isnotNull(txt_ProductQuantity.Text, "Quantity"))
            {
                P.SetProduct(Int32.Parse(txt_ProductID.Text));
                if (M.UpdateProduct(P, txt_ProductID.Text, txt_ProductName.Text, txt_ProductMaterials.Text, txt_ProductQuantity.Text))
                {
                    P.UpdateProduct(Int32.Parse(txt_ProductID.Text), txt_ProductName.Text, txt_ProductMaterials.Text, Int32.Parse(txt_ProductQuantity.Text), "In Progress");
                    ViewProducts_Load(sender, e);
                }
            }
            else
            {
                M.IncorrectEntry();
            }
        }