// Методы для манипулированиями группбоксами и датагридвью:
        #region
        void DGV_V_Stat() // Видны только объекты для манипулирования статистикой
        {
            dgv_Clients.Visible              = dgv_Advertisements.Visible = dgv_Air.Visible =
                dgv_Own_Adver.Visible        = dgv_Own_Client.Visible = menuStrip1.Visible =
                    groupBox_Clients.Visible = groupBox_V_Reklama.Visible = false;
            dgv_Own_Statistic.Visible        = groupBox_Own_Stat.Visible = true;

            Employees_Class emp = new Employees_Class();

            Emp_Fio_login = emp.ChangeFIO_Login(Emp_Code);
            V_Own_Stat_Class vs = new V_Own_Stat_Class();

            vs.Update_DGV(Emp_Fio_login, dgv_Own_Statistic);

            double sum_deals = 0;

            foreach (DataGridViewRow item in dgv_Own_Statistic.Rows)
            {
                sum_deals += double.Parse(item.Cells[5].Value.ToString());
            }

            label_count.Text = dgv_Own_Statistic.RowCount.ToString();
            label_sum.Text   = sum_deals.ToString();

            ClearBoxes();
        }
示例#2
0
        private void butSearchV_StatFIO_Click(object sender, EventArgs e)
        {
            V_Own_Stat_Class vs    = new V_Own_Stat_Class();
            string           count = vs.SumIncome(comboBoxV_StatFIO.Text, dgv_Own_Statistic);

            if (count == null || count == "0")
            {
                labelCount.Text = "0";
            }
            else
            {
                labelCount.Text = count.ToString();
            }
            labelItog.Visible = labelCount.Visible = true;
        }
示例#3
0
        void DGV_V_Stat() // Видны только объекты для манипулирования статистикой
        {
            V_Own_Stat_Class VS  = new V_Own_Stat_Class();
            Employees_Class  emp = new Employees_Class();

            dgv_Air.Visible                    = dgv_Emp.Visible =
                groupBox_Air.Visible           = groupBox_Emp.Visible = panelButtons.Enabled =
                    dgv_Advertisements.Visible = groupBox_Nothing.Visible = menuStrip1.Visible = false;
            dgv_Own_Statistic.Visible          = groupBoxV_Stat_FIO.Visible = true;
            VS.Update_DGV(dgv_Own_Statistic);

            emp.Update_DGV(dgv_Emp);
            panelButtons.Enabled = true;

            ClearBoxes();
        }