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;
            }
        }
Example #2
0
        private void AddTrip_Click(object sender, EventArgs e)
        {
            FormAddTrip formAddTrip = new FormAddTrip(this);

            formAddTrip.ShowDialog();
        }