Beispiel #1
0
        public bool AddNewRegistration(Registration aRegistration)
        {
            RegistrationDAL regDAL = new RegistrationDAL();

            //cast registration object into individual properties??
            int      cID   = aRegistration.CustomerID;
            string   pCode = aRegistration.ProductCode;
            DateTime rDate = aRegistration.RegistrationDate;


            bool registerProduct = regDAL.RegisterProduct(pCode, cID, rDate);

            if (registerProduct == true)
            {
                return(true);
            }
            else// if RegisterProduct() returns false, a record already exists!
            {
                return(false);
            }
        }
Beispiel #2
0
        public bool AddNewRegistration(Registration aRegistration)
        {
            RegistrationDAL regDAL = new RegistrationDAL();

            return(regDAL.RegisterProduct(aRegistration.ProductCode, aRegistration.CustomerID, aRegistration.RegistrationDate));
        }