Esempio n. 1
0
        public void getCustomerRegistration()
        {
            RegistrationValidation userRegister = new RegistrationValidation();
            Customer customer = new Customer {
                Name     = userRegister.getName(),
                UserName = userRegister.getUserName(),
                MailId   = userRegister.getMailId(),
                Role     = "Customer",
                Password = userRegister.getPassword()
            };
            CustomerRepositary custRepos = new CustomerRepositary();

            if (custRepos.addCustomer(customer) == 1)
            {
                Console.WriteLine("\nCustomer Added...");
            }
            else
            {
                Console.WriteLine("\nCustomer Does Not Added...");
            }
        }
Esempio n. 2
0
        public void getSellerRegistration()
        {
            RegistrationValidation userRegister = new RegistrationValidation();

            Seller seller = new Seller
            {
                Name        = userRegister.getName(),
                UserName    = userRegister.getUserName(),
                MailId      = userRegister.getMailId(),
                PhoneNumber = userRegister.getPhoneNumber(),
                Role        = "Seller",
                Password    = userRegister.getPassword()
            };
            SellerRepositary sellerRepos = new SellerRepositary();

            if (sellerRepos.addSeller(seller) >= 1)
            {
                Console.WriteLine("\nSeller Added...");
            }
            else
            {
                Console.WriteLine("\nSeller Does not Added...");
            }
        }