Esempio n. 1
0
        private void BtnClose_Click(object sender, EventArgs e)
        {
            int carId = db.CarsOnRent.FirstOrDefault(c => c.AvailableCars.RegNumber == this.CarNumber).Id;

            if (db.CarsOnRent.Find(carId) != null)
            {
                CarsOnRent carAccept = db.CarsOnRent.Find(carId);
                carAccept.AcceptedDate = DtpAcceptedDate.Value;
                db.SaveChanges();
                MessageBox.Show("Deal Has Been Closed");
                this.Close();
                RentedCars rented = new RentedCars(this.AdminId);
                rented.Show();
            }
        }
Esempio n. 2
0
        private void BtnCarReturn_Click(object sender, EventArgs e)
        {
            RentedCars rented = new RentedCars(this.adminId);

            rented.Show();
        }