Exemple #1
0
 private void Alert_Box()
 {
     string[] text = System.IO.File.ReadAllLines(LowStockSettingFile);
     if (text[1] == "true")
     {
         string message = "Your product(s) are running low!\nPlease check the product list for more information.\n"
                          + "Would you like to check now?";
         const string caption = "Low Stock Alert";
         var          result  = MessageBox.Show(message, caption, MessageBoxButtons.YesNo);
         if (result == DialogResult.Yes)
         {
             ProductList pl = new ProductList();
             pl.Show();
             this.Hide();
         }
         else
         {
             frmHomepage hp = new frmHomepage();
             hp.Show();
             this.Hide();
         }
     }
 }