예제 #1
0
        public void loadCriticalStocks()
        {
            try
            {
                String critcalVal = "";
                String count      = pos.countCritical();
                int    i          = 0;


                using (reader = pos.loadCriticalStocks())
                {
                    while (reader.Read())
                    {
                        i++;
                        critcalVal += i + "." + reader["description"].ToString() + Environment.NewLine;
                    }
                }

                PopupNotifier pop = new PopupNotifier();
                pop.Image       = Properties.Resources.ekis;
                pop.TitleText   = count + " CRITACAL ITEM(S)";
                pop.ContentText = critcalVal;
                pop.Popup();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
 public void loadCriticalStocks()
 {
     try
     {
         dataGridCritical.Rows.Clear();
         int i = 0;
         using (MySqlDataReader reader = pos.loadCriticalStocks())
         {
             while (reader.Read())
             {
                 i++;
                 dataGridCritical.Rows.Add(i, reader[0].ToString(),
                                           reader[1].ToString(),
                                           reader[2].ToString(),
                                           reader[3].ToString(),
                                           reader[4].ToString(),
                                           reader[5].ToString(),
                                           reader[6].ToString(),
                                           int.Parse(reader[7].ToString()),
                                           reader[8].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }