Example #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;
        }
Example #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();
        }
Example #3
0
 partial void DeleteGiftCard(GiftCard instance);
Example #4
0
 partial void UpdateGiftCard(GiftCard instance);
Example #5
0
 partial void InsertGiftCard(GiftCard instance);