Пример #1
0
        private void CarAddButton_Click(object sender, EventArgs e)
        {
            CarForm form = new CarForm();

            form.FormClosed += new FormClosedEventHandler(this.OnFormClose);
            form.Show();
        }
Пример #2
0
        private void MoreCarButton_Click(object sender, EventArgs e)
        {
            var car     = _unitOfWork.Cars.GetByResume(rentCarComboBox.Text);
            var carForm = new CarForm(car != null ? FormMode.View : FormMode.AddNew, OnCarFormClosed, car);

            carForm.Show();
        }
Пример #3
0
        private void ValidLogin()
        {
            MessageBox.Show("Sikeres bejelentkezés");
            var Myform = new CarForm();

            Myform.Show();
            this.Hide();
        }
Пример #4
0
        private void editCarButton_Click(object sender, EventArgs e)
        {
            int index = carsDataGridView.SelectedCells.Count > 0 ? carsDataGridView.SelectedCells[0].RowIndex : -1;

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

            form.FormClosed += new FormClosedEventHandler(this.OnFormClose);
            form.Show();
        }
Пример #5
0
        private void SelectedCarEditButton_Click(object sender, EventArgs e)
        {
            if (_selectedCar == null)
            {
                return;
            }
            var carForm = new CarForm(FormMode.Edit, OnChildFromClosed, _selectedCar);

            carForm.Show();
        }
        private void AddCarButton_Click(object sender, EventArgs e)
        {
            var form = new CarForm(ref data);

            form.FormClosed += delegate {
                ActiveAddForm = false;
                LoadCarsListview();
            };
            form.Show();
        }
Пример #7
0
        private void CarDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0 || e.RowIndex > carBindingSource.Count)
            {
                return;
            }

            var selectedCar = (Car)carDataGridView.Rows[e.RowIndex].DataBoundItem;
            var carForm     = new CarForm(FormMode.View, OnChildFromClosed, selectedCar);

            carForm.Show();
        }
Пример #8
0
        private void AddNewCarsButton_Click(object sender, EventArgs e)
        {
            var carForm = new CarForm(FormMode.AddNew, OnChildFromClosed);

            carForm.Show();
        }