Esempio n. 1
0
        private void ChangeConMenuStripButton()
        {
            if (this.Text == "Compo | Должности")
            {
                DoljForm position = new DoljForm();
                Program.ID_Position     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                position.tbName.Text    = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                position.tbOklad.Text   = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                position.btnAdd.Enabled = false;
                position.ShowDialog();
            }

            if (this.Text == "Compo | Сотрудники")
            {
                SigUpForm Employee = new SigUpForm();
                Program.ID_Sotr            = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Employee.tbFam.Text        = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Employee.tbName.Text       = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                Employee.tbOtch.Text       = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                Employee.mtbSer.Text       = dataGridView1.CurrentRow.Cells[4].Value.ToString();
                Employee.mtbNum.Text       = dataGridView1.CurrentRow.Cells[5].Value.ToString();
                Employee.mtbDateBirth.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
                Employee.cbDolj.Text       = dataGridView1.CurrentRow.Cells[7].Value.ToString();
                Employee.btnAdd.Enabled    = false;
                Employee.ShowDialog();
            }

            if (this.Text == "Compo | Торговые точки")
            {
                TTForm TT = new TTForm();
                Program.ID_TT     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                TT.tbNameTT.Text  = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                TT.tbPrice.Text   = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                TT.tbAdres.Text   = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                TT.btnAdd.Enabled = false;
                TT.ShowDialog();
            }

            if (this.Text == "Compo | Дежурные группы")
            {
                GroupForm Group = new GroupForm();
                Program.ID_Group           = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Program.ID                 = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Group.mtbDate.Text         = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                Group.btnAdd.Enabled       = false;
                Group.btnNaznachit.Enabled = false;
                Group.ShowDialog();
            }

            if (this.Text == "Compo | Статусы")
            {
                StatusForm Status = new StatusForm();
                Program.ID_Status     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Status.tbStatus.Text  = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Status.btnAdd.Enabled = false;
                Status.ShowDialog();
            }


            if (this.Text == "Compo | Заявки")
            {
                ZayavkaForm Zayavka = new ZayavkaForm();
                Program.ID_Zayavka     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Zayavka.btnAdd.Enabled = false;
                Zayavka.Show();
            }

            if (this.Text == "Compo | Типы работ")
            {
                TipRabotForm TipRabot = new TipRabotForm();
                Program.ID_TipRabot      = (int)dataGridView1.CurrentRow.Cells[0].Value;
                TipRabot.tbTipRabot.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                TipRabot.btnAdd.Enabled  = false;
                TipRabot.ShowDialog();
            }

            if (this.Text == "Compo | Выполненные работы")
            {
                Vip_no_RabotForm Vip_no_Rabot = new Vip_no_RabotForm();
                Program.ID_Vip_no_Rabot     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Vip_no_Rabot.btnAdd.Enabled = false;
                Vip_no_Rabot.ShowDialog();
            }
        }
Esempio n. 2
0
        private void AddConMenuStripButton()
        {
            if (this.Text == "Compo | Должности")
            {
                DoljForm Dolj = new DoljForm();
                Dolj.btnUpdate.Enabled = false;
                Dolj.btnDelete.Enabled = false;
                Dolj.ShowDialog();
            }

            if (this.Text == "Compo | Сотрудники")
            {
                SigUpForm Employee = new SigUpForm();
                Employee.btnUpdate.Enabled = false;
                Employee.btnDelete.Enabled = false;
                Employee.ShowDialog();
            }

            if (this.Text == "Compo | Торговые точки")
            {
                TTForm TT = new TTForm();
                TT.btnUpdate.Enabled = false;
                TT.btnDelete.Enabled = false;
                TT.ShowDialog();
            }

            if (this.Text == "Compo | Дежурные группы")
            {
                GroupForm Group = new GroupForm();
                Group.btnUpdate.Enabled  = false;
                Group.btnDelete.Enabled  = false;
                Group.btnIzmenit.Enabled = false;
                Group.btnSnyat.Enabled   = false;
                Group.ShowDialog();
            }

            if (this.Text == "Compo | Статусы")
            {
                StatusForm Status = new StatusForm();
                Status.btnUpdate.Enabled = false;
                Status.btnDelete.Enabled = false;
                Status.ShowDialog();
            }

            if (this.Text == "Compo | Заявки")
            {
                ZayavkaForm Zayavka = new ZayavkaForm();
                Zayavka.btnUpdate.Enabled = false;
                Zayavka.btnDelete.Enabled = false;
                Zayavka.ShowDialog();
            }

            if (this.Text == "Compo | Типы работ")
            {
                TipRabotForm TipRabot = new TipRabotForm();
                TipRabot.btnUpdate.Enabled = false;
                TipRabot.btnDelete.Enabled = false;
                TipRabot.ShowDialog();
            }

            if (this.Text == "Compo | Выполненные работы")
            {
                Vip_no_RabotForm Vip_no_Rabot = new Vip_no_RabotForm();
                Vip_no_Rabot.btnUpdate.Enabled = false;
                Vip_no_Rabot.btnDelete.Enabled = false;
                Vip_no_Rabot.ShowDialog();
            }
        }