Exemplo n.º 1
0
        private void ChangeConMenuStripButton()
        {
            if (this.Text == "DryCleaning | Должности")
            {
                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 == "DryCleaning | Прейскурант")
            {
                PriceListForm PriceList = new PriceListForm();
                Program.ID_Service           = (int)dataGridView1.CurrentRow.Cells[0].Value;
                PriceList.tbNameService.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                PriceList.tbPrice.Text       = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                PriceList.btnAdd.Enabled     = false;
                PriceList.ShowDialog();
            }

            if (this.Text == "DryCleaning | Список сотрудников")
            {
                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.cbDolj.Text    = dataGridView1.CurrentRow.Cells[6].Value.ToString();
                Employee.dtpNaim.Value  = Convert.ToDateTime(dataGridView1.CurrentRow.Cells[8].Value);
                Employee.mtbYvol.Text   = dataGridView1.CurrentRow.Cells[9].Value.ToString();
                Employee.btnAdd.Enabled = false;
                Employee.ShowDialog();
            }

            if (this.Text == "DryCleaning | Чеки")
            {
                CheckForm Check = new CheckForm();
                Program.ID_Check            = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Check.cbFIOKas.Text         = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Check.cbService.Text        = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                Check.nudKolichecstvo.Value = (int)dataGridView1.CurrentRow.Cells[4].Value;
                Check.tbSum.Text            = dataGridView1.CurrentRow.Cells[5].Value.ToString();
                Check.cbFIOCln.Text         = dataGridView1.CurrentRow.Cells[7].Value.ToString();
                Check.mtbDate.Text          = dataGridView1.CurrentRow.Cells[6].Value.ToString();
                Check.btnAdd.Enabled        = false;
                Check.ShowDialog();
            }

            if (this.Text == "DryCleaning | Карты учета НМА")
            {
                CardForm Card = new CardForm();
                Program.ID_Card          = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Card.cbLicenzia.Text     = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Card.cbOrganization.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
                Card.tbCena.Text         = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                Card.mtbDate.Text        = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                Card.cbSotr.Text         = dataGridView1.CurrentRow.Cells[5].Value.ToString();
                Card.btnAdd.Enabled      = false;
                Card.ShowDialog();
            }

            if (this.Text == "DryCleaning | Организация")
            {
                CompanyForm company = new CompanyForm();
                Program.ID_Company       = (int)dataGridView1.CurrentRow.Cells[0].Value;
                company.tbName.Text      = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                company.tbFullName.Text  = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                company.tbAdresRegs.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                company.tbAdresFact.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
                company.mtbINN.Text      = dataGridView1.CurrentRow.Cells[5].Value.ToString();
                company.mtbNum.Text      = dataGridView1.CurrentRow.Cells[6].Value.ToString();
                company.tbEmail.Text     = dataGridView1.CurrentRow.Cells[7].Value.ToString();
                company.btnAdd.Enabled   = false;
                company.Show();
            }

            if (this.Text == "DryCleaning | Клиенты")
            {
                ClientForm Client = new ClientForm();
                Program.ID_Client     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Client.tbFam.Text     = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Client.tbName.Text    = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                Client.tbOtch.Text    = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                Client.mtbNum.Text    = dataGridView1.CurrentRow.Cells[4].Value.ToString();
                Client.btnAdd.Enabled = false;
                Client.ShowDialog();
            }

            if (this.Text == "DryCleaning | Лицензиаты")
            {
                LicenziatForm Licenziat = new LicenziatForm();
                Program.ID_Licenziat       = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Licenziat.btnAdd.Enabled   = false;
                Licenziat.mtbINN.Text      = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Licenziat.tbFam.Text       = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                Licenziat.tbName.Text      = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                Licenziat.tbOtch.Text      = dataGridView1.CurrentRow.Cells[4].Value.ToString();
                Licenziat.tbAdresRegs.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
                Licenziat.tbAdresFact.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
                Licenziat.mtbNum.Text      = dataGridView1.CurrentRow.Cells[7].Value.ToString();
                Licenziat.tbEmail.Text     = dataGridView1.CurrentRow.Cells[8].Value.ToString();
                Licenziat.ShowDialog();
            }

            if (this.Text == "DryCleaning | Лицензии")
            {
                LicenziaForm Licenzia = new LicenziaForm();
                Program.ID_Licenzia      = (int)dataGridView1.CurrentRow.Cells[0].Value;
                Licenzia.tbLicenzia.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                Licenzia.btnAdd.Enabled  = false;
                Licenzia.ShowDialog();
            }

            if (this.Text == "DryCleaning | Лицензионные договора")
            {
                LicDocForm licDoc = new LicDocForm();
                Program.ID_LicDoc     = (int)dataGridView1.CurrentRow.Cells[0].Value;
                licDoc.btnAdd.Enabled = false;
                licDoc.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void AddConMenuStripButton()
        {
            if (this.Text == "DryCleaning | Чеки")
            {
                CheckForm Check = new CheckForm();
                Check.btnUpdate.Enabled = false;
                Check.btnDelete.Enabled = false;
                Check.ShowDialog();
            }

            if (this.Text == "DryCleaning | Должности")
            {
                DoljForm Dolj = new DoljForm();
                Dolj.btnUpdate.Enabled = false;
                Dolj.btnDelete.Enabled = false;
                Dolj.ShowDialog();
            }

            if (this.Text == "DryCleaning | Прейскурант")
            {
                PriceListForm PriceList = new PriceListForm();
                PriceList.btnUpdate.Enabled = false;
                PriceList.btnDelete.Enabled = false;
                PriceList.ShowDialog();
            }

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

            if (this.Text == "DryCleaning | Карты учета НМА")
            {
                CardForm Card = new CardForm();
                Card.btnUpdate.Enabled = false;
                Card.btnDelete.Enabled = false;
                Card.ShowDialog();
            }

            if (this.Text == "DryCleaning | Организация")
            {
                CompanyForm company = new CompanyForm();
                company.btnUpdate.Enabled = false;
                company.btnDelete.Enabled = false;
                company.ShowDialog();
            }

            if (this.Text == "DryCleaning | Клиенты")
            {
                ClientForm Client = new ClientForm();
                Client.btnUpdate.Enabled = false;
                Client.btnDelete.Enabled = false;
                Client.ShowDialog();
            }

            if (this.Text == "DryCleaning | Лицензиаты")
            {
                LicenziatForm Licenziat = new LicenziatForm();
                Licenziat.btnUpdate.Enabled = false;
                Licenziat.btnDelete.Enabled = false;
                Licenziat.ShowDialog();
            }

            if (this.Text == "DryCleaning | Лицензии")
            {
                LicenziaForm Licenzia = new LicenziaForm();
                Licenzia.btnUpdate.Enabled = false;
                Licenzia.btnDelete.Enabled = false;
                Licenzia.ShowDialog();
            }

            if (this.Text == "DryCleaning | Лицензионные договора")
            {
                LicDocForm LicDoc = new LicDocForm();
                LicDoc.btnUpdate.Enabled = false;
                LicDoc.btnDelete.Enabled = false;
                LicDoc.ShowDialog();
            }
        }