private void CarAddButton_Click(object sender, EventArgs e) { CarForm form = new CarForm(); form.FormClosed += new FormClosedEventHandler(this.OnFormClose); form.Show(); }
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(); }
private void ValidLogin() { MessageBox.Show("Sikeres bejelentkezés"); var Myform = new CarForm(); Myform.Show(); this.Hide(); }
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(); }
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(); }
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(); }
private void AddNewCarsButton_Click(object sender, EventArgs e) { var carForm = new CarForm(FormMode.AddNew, OnChildFromClosed); carForm.Show(); }