Beispiel #1
0
        protected void GetUserToUpdate()
        {
            var    UserToUpdate = new Customer();
            int    id;
            string idToUpdate = Session["UserToUpdate"].ToString();

            Int32.TryParse(idToUpdate, out id);

            UserToUpdate = context.GetCustomer(id);

            _txtBoxUserName.Text    = UserToUpdate.CustomerName;
            _txtBoxUserAddress.Text = UserToUpdate.CustomerAdress;
            _txtBoxPhone.Text       = UserToUpdate.CustomerPhone;
        }
Beispiel #2
0
        public static void GetCustomers()
        {
            RepoCustomer repoCust  = new RepoCustomer();
            var          customers = repoCust.GetCustomer();

            foreach (var customer in customers)
            {
                Console.WriteLine($"CustomerID: {customer.CustomerID}");
                Console.WriteLine($"Customer Name: {customer.CustomerName}");
                foreach (var renteresMovie in customer.RenteredMoviesCustomer)
                {
                    Console.WriteLine($"CustomerID: {renteresMovie.Customer}");
                }
            }
            Console.ReadKey();
        }