Beispiel #1
0
 private void btnComplete_Click(object sender, EventArgs e)
 {
     if (cmbClerkName.SelectedIndex == -1) //check is employee name selected
     {
         MessageBox.Show("You have to choose your name before submit order.");
     }
     else if (cmbCustomerID.SelectedIndex == -1) // Check is customer selected
     {
         MessageBox.Show("You have to choose customer before submit order.");
     }
     else
     {
         if (checkStock() == null) // If no outOfStock product, update DataBase
         {
             updateDataBase();
         }
         // Open confirmation for to dispaly result
         Form myfrmConfirmation = new frmConfirmation(this);
         myfrmConfirmation.MdiParent = this.MdiParent;
         myfrmConfirmation.Text      = "Confirmation for " + this.Text;
         myfrmConfirmation.Show();
     }
 }
 private void btnComplete_Click(object sender, EventArgs e)
 {
     if (cmbClerkName.SelectedIndex == -1) //check is employee name selected
     {
         MessageBox.Show("You have to choose your name before submit order.");
     }
     else if (cmbCustomerID.SelectedIndex == -1) // Check is customer selected
     {
         MessageBox.Show("You have to choose customer before submit order.");
     }
     else
     {
         if (checkStock() == null) // If no outOfStock product, update DataBase
         {
             updateDataBase();
         }
         // Open confirmation for to dispaly result
         Form myfrmConfirmation = new frmConfirmation(this);
         myfrmConfirmation.MdiParent = this.MdiParent;
         myfrmConfirmation.Text = "Confirmation for " + this.Text;
         myfrmConfirmation.Show();
     }
 }