Ejemplo n.º 1
0
        //When the products button is clicked.
        private void btnNotifications_Click(object sender, EventArgs e)
        {
            // Load form.
            ProductsForm products = new ProductsForm();

            products.Show();
            this.Close();
        }
Ejemplo n.º 2
0
        // When products button is clicked.
        private void Button2_Click(object sender, EventArgs e)
        {
            // Load page.
            ProductsForm products = new ProductsForm();

            products.Show();
            this.Close();
        }
Ejemplo n.º 3
0
        // When back button is clicked.
        private void BackBtn_Click(object sender, EventArgs e)
        {
            // Load form.
            ProductsForm products = new ProductsForm();

            products.Show();
            this.Close();
        }
Ejemplo n.º 4
0
        // When product button is clicked.
        private void BtnProducts_Click(object sender, EventArgs e)
        {
            // Show loading circle.
            loadingCircle.Visible = true;
            // Load form.
            ProductsForm allproducts = new ProductsForm();

            allproducts.Show();
            this.Close();
        }
Ejemplo n.º 5
0
        // When submit button is clicked.
        private void SubmitBtn_Click(object sender, EventArgs e)
        {
            // Loading circle visible.
            loadingCircle.Visible = true;
            // Using MVC.
            Product selectedProduct = Program.GetCurrentProduct();
            User    selectedUser    = Program.GetCurrentUser();
            // Converting numericupdown to value.
            int quantity   = Convert.ToInt32(Qty.Value);
            int totalPrice = Convert.ToInt32(quantity * selectedProduct.price);

            // Adding a stationery request to the database table by populating with required data.
            sepdbDataSetTableAdapters.stationeryrequestTableAdapter statReq = new sepdbDataSetTableAdapters.stationeryrequestTableAdapter();
            statReq.SubmitStatReq(selectedUser.UserId, selectedProduct.productid, DateTime.Today + "", "Submitted", quantity, totalPrice);
            // Show when request has been submitted.
            MessageBox.Show("Your Product Request has been Submitted.");
            // Load form.
            ProductsForm productform = new ProductsForm();

            productform.Show();
            this.Close();
        }