/// <summary>
        /// Add new lease to database
        /// </summary>
        /// <param name="selectedSlipId">slip that was selected</param>
        private void addNewLease(int selectedSlipId)
        {
            int slipID = Convert.ToInt32(selectedSlipId);
            int custID = Convert.ToInt32(Session["custID"]);

            LeaseManager.Add(slipID, custID);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //Data Transformation Object-DTO
            //CarTest();
            //LeaseTest();

            //UserTest();

            //LeaseGetByIdTest();


            LeaseManager leaseManager = new LeaseManager(new EfLeaseDal());

            System.Console.WriteLine(leaseManager.Add(new Lease {
                CarId = 1, CustomerId = 2, LeaseDate = DateTime.Now
            }).Message);
        }