Beispiel #1
0
        private void dataGridApp_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                int  ind   = dataGridApp.CurrentCell.RowIndex;
                bool edit2 = true;

                AddApp AdA = new AddApp(this, ind, edit2, flag);
                AdA.Show();
            }
            catch (NullReferenceException)
            {
            }
        }
Beispiel #2
0
        private void добавитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (tabControl1.SelectedTab == tabPage1)
            {
                AddMed addMed = new AddMed(this);
                addMed.Show();
                Update();
            }

            if (tabControl1.SelectedTab == tabPage2)
            {
                AddApp addApp = new AddApp(this);
                addApp.Show();
                Update();
            }

            if (tabControl1.SelectedTab == tabPage3)
            {
                AddInvoce addInv = new AddInvoce(this);
                addInv.Show();
                Update();
            }
        }
Beispiel #3
0
        private void редактироватьToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                if (tabControl1.SelectedTab == tabPage1)
                {
                    int  index = dataGridMed1.CurrentCell.RowIndex;
                    bool edit  = true;

                    AddMed AdM = new AddMed(this, index, edit, flag);
                    AdM.Show();
                }

                if (tabControl1.SelectedTab == tabPage2)
                {
                    int  ind   = dataGridApp.CurrentCell.RowIndex;
                    bool edit2 = true;

                    AddApp AdA = new AddApp(this, ind, edit2, flag);
                    AdA.Show();
                }

                if (tabControl1.SelectedTab == tabPage3)
                {
                    int  ind   = dataGridInvoice.CurrentCell.RowIndex;
                    bool edit2 = true;

                    AddInvoce AdI = new AddInvoce(this, ind, edit2, flag);
                    AdI.Show();
                }
            }
            catch (NullReferenceException)
            {
                MessageBox.Show("Выберите строку для редактирования");
            }
        }