Example #1
0
        private void ModelAdd_Click(object sender, EventArgs e)
        {
            ModelForm form = new ModelForm();

            form.FormClosed += new FormClosedEventHandler(this.OnFormClose);
            form.Show();
        }
Example #2
0
        private void ModelEdit_Click(object sender, EventArgs e)
        {
            int index = modelGridView.SelectedCells.Count > 0 ? modelGridView.SelectedCells[0].RowIndex : -1;

            index = index != -1 ? Int32.Parse(modelGridView.Rows[index].Cells[0].Value.ToString()) : 0;
            ModelForm form = new ModelForm(index);

            form.FormClosed += new FormClosedEventHandler(this.OnFormClose);
            form.Show();
        }