Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox6.Text != "")
     {
         if (textBox4.Text != "")
         {
             if (textBox13.Text != "")
             {
                 int dispStock = Convert.ToInt32(textBox11.Text);
                 int quantity  = Convert.ToInt32(textBox13.Text);
                 if (dispStock - quantity >= 0)
                 {
                     string receiver = "miscellaneous";
                     store  st       = new store();
                     st.dispExpiredStock(dispStock, quantity, textBox6.Text, textBox4.Text, username, receiver, textBox7.Text);
                     loadMedicines();
                     textBox5.Text = "";
                     clearData();
                 }
                 else
                 {
                     MessageBox.Show("WARNING!! You cannot transfer quantity more than that is available in Stock!!!");
                 }
             }
             else
             {
                 MessageBox.Show("Please enter the amount of Stock to be transfered!!");
                 textBox13.Focus();
             }
         }
         else
         {
             MessageBox.Show("Please enter request details of transfer.");
             textBox4.Focus();
         }
     }
     else
     {
         MessageBox.Show("Please Select a Medicine!!");
     }
 }