private void btnAddNewPosition_Click(object sender, EventArgs e) { Form1.AddOrEdit = AddEditOrDelete.Add; switch (Form1.WindowIndex) { case WindowsStruct.MalfAdd: formAddPrice = new FormAddPrice(mainForm, this); formAddPrice.ShowDialog(); break; case WindowsStruct.SpareAdd: formAddPrice = new FormAddPrice(mainForm, this); formAddPrice.ShowDialog(); break; } }
private void btnEditPosition_Click(object sender, EventArgs e) { Form1.AddOrEdit = AddEditOrDelete.Edit; switch (Form1.WindowIndex) { case WindowsStruct.MalfAdd: formAddPrice = new FormAddPrice(mainForm, this); mainForm.FillFormPrice(dataGridView, formAddPrice); break; case WindowsStruct.SpareAdd: formAddPrice = new FormAddPrice(mainForm, this); mainForm.FillFormPrice(dataGridView, formAddPrice); break; case WindowsStruct.AddTripInWay: FormAddTrip formAddTrip = new FormAddTrip(this, mainForm); formAddTrip.trip = new TripMapper().Get(dataGridView.SelectedRows[0].Cells[0].Value.ToString()); formAddTrip.textBoxTrip.Text = formAddTrip.trip.Name; formAddTrip.ShowDialog(); break; } }
public FormForSelect(FormAddPrice FormAddPrice) : this() { this.formAddPrice = FormAddPrice; }