Ejemplo n.º 1
0
        public void UpdateGift(GiftCard param)
        {
            // Get sysdate
            var currentDate = DateTime.Now;

            // Set item
            var entity = GetSingle<GiftCard>(param.GiftCd, false);
            entity.GiftStatus = param.GiftStatus;
            if (entity.GiftStatus == Logics.CD_GIFT_STATUS_ACTIVE)
                entity.StartDate = currentDate;
            entity.UpdateUser = PageHelper.UserName;
            entity.UpdateDate = currentDate;
        }
Ejemplo n.º 2
0
        public void InsertGift(SaveDataModel inputObject)
        {
            // Get sysdate
            var currentDate = DateTime.Now;

            // Set item
            var entity = new GiftCard();
            entity.GiftCd = inputObject.GiftCd;
            entity.GiftStatus = Logics.CD_GIFT_STATUS_ACTIVE;
            entity.Price = inputObject.Price;
            entity.StartDate = inputObject.StartDate;
            entity.EndDate = inputObject.EndDate;
            entity.Notes = inputObject.Notes;

            entity.CreateDate = currentDate;
            entity.UpdateUser = PageHelper.UserName;
            entity.UpdateDate = currentDate;
            entity.DeleteFlag = false;

            EntityManager.GiftCards.InsertOnSubmit(entity);

            // Submit
            EntityManager.SubmitChanges();
        }
Ejemplo n.º 3
0
 partial void DeleteGiftCard(GiftCard instance);
Ejemplo n.º 4
0
 partial void UpdateGiftCard(GiftCard instance);
Ejemplo n.º 5
0
 partial void InsertGiftCard(GiftCard instance);