Beispiel #1
0
        // When the cancel button is clicked.
        private void CancelLbl_Click(object sender, EventArgs e)
        {
            // Load form.
            RequestsForm form = new RequestsForm();

            form.Show();
        }
        // When the requests button is clicked.
        private void btnSystemSettings_Click(object sender, EventArgs e)
        {
            // Load form.
            RequestsForm form = new RequestsForm();

            form.Show();
            this.Close();
        }
Beispiel #3
0
        // When requests button is clicked.
        private void Button1_Click(object sender, EventArgs e)
        {
            // Load page.
            RequestsForm form = new RequestsForm();

            form.Show();
            this.Close();
        }
Beispiel #4
0
        // When requests picture is clicked
        private void PictureBox3_Click(object sender, EventArgs e)
        {
            // Show loading circle.
            loadingCircle.Visible = true;
            // Load form.
            RequestsForm requests = new RequestsForm();

            requests.Show();
            this.Close();
        }
Beispiel #5
0
 // When the save button is clicked.
 private void SaveBtn_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to update the quantity?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         // User clicked yes.
         // Convert the encessary table cells to values.
         int selectedRequestID = Convert.ToInt32(requestDataGrid.CurrentRow.Cells[0].Value);
         int productPrice      = Convert.ToInt32(requestDataGrid.CurrentRow.Cells[8].Value);
         int quantity          = Convert.ToInt32(Qty.Value);
         int totalPrice        = (quantity * productPrice);
         // The database table is updated.
         stationeryrequestTableAdapter.UpdateQuantity(quantity, totalPrice, selectedRequestID);
         // Load form.
         RequestsForm form = new RequestsForm();
         form.Show();
         this.Close();
     }
     else
     {
         // User clicked no.
         // The action is cancelled, return to "My Requests" page.
     }
 }