Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         users user = new users(textBox1.Text, textBox2.Text);
         if(user.message == "sucess")
         {
             if(user.post == "accounts")
             {
                 Form accounts = new AccountsMain();
                 accounts.ShowDialog();
             } 
             else if(user.post == "store")
             {
                 Form stock = new StockMain();
                 stock.ShowDialog();
             }
         }
         else
         {
             MessageBox.Show(user.message);
         }
         
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         
     }
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         users user = new users(textBox1.Text, textBox2.Text);
         if (user.message == "sucess")
         {
             if (user.post == "accounts")
             {
                 Form accounts = new AccountsMain();
                 accounts.ShowDialog();
             }
             else if (user.post == "store")
             {
                 Form stock = new StockMain();
                 stock.ShowDialog();
             }
         }
         else
         {
             MessageBox.Show(user.message);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }