예제 #1
0
        private void NewSuplementToolStripMenuItem_Click(object sender, EventArgs e)
        {
            numAmount suplementsAddForm = new numAmount(_accessToken, null);

            suplementsAddForm.MdiParent   = this;
            suplementsAddForm.WindowState = FormWindowState.Maximized;
            suplementsAddForm.ControlBox  = false;
            suplementsAddForm.MaximizeBox = false;
            suplementsAddForm.MinimizeBox = false;
            suplementsAddForm.ShowIcon    = false;
            suplementsAddForm.Show();
        }
예제 #2
0
        private void DgvSuplements_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int selectedRowIndex = dgvSuplements.CurrentCell.RowIndex;
            int id = int.Parse(dgvSuplements.Rows[selectedRowIndex].Cells[0].Value.ToString());

            Suplement suplementForEdit = _suplements.Where(x => x.Id == id).FirstOrDefault();

            numAmount suplementAddForm = new numAmount(_accessToken, suplementForEdit);

            suplementAddForm.MdiParent   = this.MdiParent;
            suplementAddForm.WindowState = FormWindowState.Maximized;
            suplementAddForm.ControlBox  = false;
            suplementAddForm.MaximizeBox = false;
            suplementAddForm.MinimizeBox = false;
            suplementAddForm.ShowIcon    = false;

            suplementAddForm.Show();
        }