Пример #1
0
 private void fHomePages_Load(object sender, EventArgs e)
 {
     Account = ConnectSQL.ExcuteQuery("Select IDStaff, Status from Account");
     for (int i = 0; i < Account.Rows.Count; i++)
     {
         if (Account.Rows[i][1].ToString() == "1")
         {
             ReturnIDAccount = Account.Rows[i][0].ToString();
         }
     }
     Bill = ConnectSQL.ExcuteQuery("select distinct YEAR(date) from Bill");
     for (int i = 0; i < Bill.Rows.Count; i++)
     {
         if (Bill.Rows[0][0] != DBNull.Value)
         {
             cbYear.Items.Add(Bill.Rows[i][0].ToString());
         }
     }
     cbYear.SelectedIndex = 0;
     cMonth.Checked       = true;
     chartMonth.ChartAreas[0].AxisX.Minimum = 1;
     chartMonth.ChartAreas[0].AxisX.Maximum = 12;
     timer1.Start();
     CreateChartMonth();
     CreateChartQuy();
     CreateChartProduct();
     CreateChartCustomer();
     rProduct.Checked      = true;
     chartCustomer.Visible = false;
 }