private void araçKiralamaAraYüzüToolStripMenuItem_Click(object sender, EventArgs e) { Carlisting userInterFace = new Carlisting(); userInterFace.UserId = AdminId; userInterFace.Show(); this.Hide(); }
private void btnGoBackCarListing_Click(object sender, EventArgs e) { Carlisting carlisting = new Carlisting(); carlisting.UserId = UserId; carlisting.Show(); this.Hide(); }
private void btnFinish_Click(object sender, EventArgs e) { int birthdate = dtpckerBirthDate.Value.Year; int today = DateTime.Now.Year; int year = today - birthdate; if (!helper.PanelControl(pnlCustomerRentForm) || txtUserIdentity.TextLength != 11 || year < 18) { MessageBox.Show("Lütfen bilgilerinizi eksiksiz doldurunuz, (18 yaşından küçükler işlem yapamaz.) "); } else { customer.Name = txtUserName.Text.Trim().ToUpper(); customer.LastName = txtUserSurname.Text.Trim().ToUpper(); customer.IdentityNo = txtUserIdentity.Text.Trim(); customer.BirthDate = dtpckerBirthDate.Value; customer.City = txtUserCity.Text.Trim().ToUpper(); if (customerController.AddUserRentDetailController(customer)) { rentedDetail.FirstRentDate = FirstRentDay; rentedDetail.LastRentDate = LastRentDay; rentedDetail.CarId = CarId; rentedDetail.UserId = UserId; rentedDetail.CountOfRentDay = RentDay; rentedDetail.TotalRentPrice = TotalPrice; rentedDetail.CutomerId = customerController.GetCustomerIdController(customer); CarUpdate(); rentedContoller.AddUserDetailContoller(rentedDetail); DialogResult dialogResult = MessageBox.Show("Kiralama işlem başarı ile gerçekleşti tekrar araba kiralamak ister misiniz? ", "Bilgi", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Carlisting carlisting = new Carlisting(); carlisting.UserId = UserId; carlisting.Show(); this.Close(); } else if (dialogResult == DialogResult.No) { userInterFace.UserId = UserId; userInterFace.Show(); this.Hide(); } } } }