Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (dataGridView_family.Rows.Count == 0)
            {
                return;
            }
            int     selRowNum = dataGridView_family.SelectedCells[0].RowIndex;
            decimal tabNumber = (decimal)dataGridView_family.Rows[selRowNum].Cells[2].Value;

            if (priem.Checked == true)
            {
                PriemWorkPrikaz priemWorkPrikaz = new PriemWorkPrikaz(tabNumber);
                priemWorkPrikaz.Show();
            }

            if (deletework.Checked == true)
            {
                DelWorkPrikaz delWorkPrikaz = new DelWorkPrikaz(tabNumber);
                delWorkPrikaz.Show();
            }

            if (perevod.Checked == true)
            {
                PerevodWorkPrikaz perevodWorkPrikaz = new PerevodWorkPrikaz(tabNumber);
                perevodWorkPrikaz.Show();
            }

            if (comandirovka.Checked == true)
            {
                KomandirovkaForm form = new KomandirovkaForm();
                form.SetOneWorkerByTabelNumber(tabNumber);
                form.Show();
            }
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (dataGridView_family.Rows.Count == 0)
            {
                return;
            }
            int    selRowNum = dataGridView_family.SelectedCells[0].RowIndex;
            Model1 model     = new Model1();
            string pkString  = _list[selRowNum].ToString();
            int    pkInt     = 1;

            Int32.TryParse(pkString, out pkInt);
            var selectedPrikaz = model.PRIKAZ.FirstOrDefault(prikaz =>
                                                             prikaz.PK_PRIKAZ == pkInt);

            if (selectedPrikaz == null)
            {
                return;
            }

            if (selectedPrikaz.TYPE_PRIKAZ.PK_TYPE == 1)
            {
                ReadPriemPrikaz readPriemPrikaz = new ReadPriemPrikaz(selectedPrikaz.PK_PRIKAZ);
                readPriemPrikaz.Show();
            }

            if (selectedPrikaz.TYPE_PRIKAZ.PK_TYPE == 2)
            {
                KomandirovkaForm form = new KomandirovkaForm();
                form.SetPrikaz(selectedPrikaz.PK_PRIKAZ);
                form.Show();
            }

            if (selectedPrikaz.TYPE_PRIKAZ.PK_TYPE == 3)
            {
                ReadDelWorkPrikaz readDelWorkPrikaz = new ReadDelWorkPrikaz(selectedPrikaz.PK_PRIKAZ);
                readDelWorkPrikaz.Show();
            }

            if (selectedPrikaz.TYPE_PRIKAZ.PK_TYPE == 4)
            {
                ReadPerevodWork readPerevodPrikaz = new ReadPerevodWork(selectedPrikaz.PK_PRIKAZ);
                readPerevodPrikaz.Show();
            }
        }
Beispiel #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            KomandirovkaForm ownedForm = new KomandirovkaForm();

            ownedForm.Show();
        }