Ejemplo n.º 1
0
        public static Kortingcoupon FindByCode(string code)
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            return(kcr.RetrieveByCode(code));
        }
Ejemplo n.º 2
0
        public void Delete()
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            kcr.Delete("1");
        }
Ejemplo n.º 3
0
        public static Kortingcoupon Find(string key)
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            return(kcr.Retrieve(key));
        }
Ejemplo n.º 4
0
        public static List <Kortingcoupon> All()
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            return(kcr.RetrieveAll());
        }
Ejemplo n.º 5
0
        public void RetrieveAll()
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            List <Kortingcoupon> lijst = kcr.RetrieveAll();

            Assert.AreEqual("Zomer10", lijst[0].Code);
        }
Ejemplo n.º 6
0
        public void Retrieve()
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            Kortingcoupon k = kcr.Retrieve("1");

            Assert.AreEqual("Zomer10", k.Code);
        }
Ejemplo n.º 7
0
        public void Update()
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            Kortingcoupon k = kcr.Retrieve("1");

            k.Code = "Zomer20";
            k.Kortingspercentage = 20;

            kcr.Update(k);
        }
Ejemplo n.º 8
0
        public void SaveOrUpdate()
        {
            KortingcouponSQLContext ksc = new KortingcouponSQLContext();
            KortingCouponRepository kcr = new KortingCouponRepository(ksc);

            if (Id != 0)
            {
                kcr.Update(this);
            }
            else
            {
                kcr.Create(this);
            }
        }
Ejemplo n.º 9
0
 public void Create()
 {
     KortingcouponSQLContext ksc = new KortingcouponSQLContext();
     KortingCouponRepository kcr = new KortingCouponRepository(ksc);
     Kortingcoupon           k   = kcr.Retrieve("1");
 }