public ProductTopping AddProductTopping(int vProductToppingID, int vProductID, int vToppingID, decimal vExtraPrice, decimal vIncrement, string vTitle, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            ProductTopping lProductTopping = new ProductTopping();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vProductToppingID > 0)
                {
                    lProductTopping = frctx.ProductToppings.FirstOrDefault(u => u.ProductToppingId == vProductToppingID);
                    lProductTopping.ExtraToppingPrice = vExtraPrice;
                    lProductTopping.Increment         = vIncrement;
                    lProductTopping.UpdatedDate       = vUpdatedDate;
                    lProductTopping.UpdatedBy         = vUpdatedBy;
                    lProductTopping.Active            = vActive;
                    return(frctx.SaveChanges() > 0 ? lProductTopping : null);
                }
                else
                {
                    lProductTopping.ExtraToppingPrice = vExtraPrice;
                    lProductTopping.Increment         = vIncrement;
                    lProductTopping.ToppingTitle      = vTitle;
                    lProductTopping.ProductId         = vProductID;
                    lProductTopping.ToppingId         = vToppingID;
                    lProductTopping.AddedDate         = vAddedDate;
                    lProductTopping.AddedBy           = vAddedBy;
                    lProductTopping.UpdatedDate       = vUpdatedDate;
                    lProductTopping.UpdatedBy         = vUpdatedBy;
                    lProductTopping.Active            = vActive;
                    return(AddProductTopping(lProductTopping));
                }
            }
        }
예제 #2
0
        public ContactInfo AddContactInfo(int vContactInfoID, string vPhone, string vPhone2, string vEmail, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            ContactInfo lContactInfo = new ContactInfo();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vContactInfoID > 0)
                {
                    lContactInfo       = frctx.ContactInfos.FirstOrDefault(u => u.ContactInfoId == vContactInfoID);
                    lContactInfo.Phone = vPhone;
                    lContactInfo.Email = vEmail;

                    lContactInfo.UpdatedDate = vUpdatedDate;
                    lContactInfo.UpdatedBy   = vUpdatedBy;
                    lContactInfo.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lContactInfo : null);
                }
                else
                {
                    lContactInfo.Phone = vPhone;
                    lContactInfo.Email = vEmail;

                    lContactInfo.AddedDate   = vAddedDate;
                    lContactInfo.AddedBy     = vAddedBy;
                    lContactInfo.Phone2      = vPhone2;
                    lContactInfo.UpdatedDate = vUpdatedDate;
                    lContactInfo.UpdatedBy   = vUpdatedBy;
                    lContactInfo.Active      = vActive;
                    return(AddContactInfo(lContactInfo));
                }
            }
        }
예제 #3
0
        public CheeseAmount AddCheeseAmount(int vCheeseAmountID, int vProductID, string vTitle, string vDescription, decimal vPrice, decimal vBizPrice, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            CheeseAmount lCheeseAmount = new CheeseAmount();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vCheeseAmountID > 0)
                {
                    lCheeseAmount             = frctx.CheeseAmounts.FirstOrDefault(u => u.CheeseAmountId == vCheeseAmountID);
                    lCheeseAmount.Title       = vTitle;
                    lCheeseAmount.Description = vDescription;
                    lCheeseAmount.Price       = vPrice;
                    lCheeseAmount.BizPrice    = vBizPrice;
                    lCheeseAmount.UpdatedDate = vUpdatedDate;
                    lCheeseAmount.UpdatedBy   = vUpdatedBy;
                    lCheeseAmount.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lCheeseAmount : null);
                }
                else
                {
                    lCheeseAmount.Title       = vTitle;
                    lCheeseAmount.Description = vDescription;
                    lCheeseAmount.Price       = vPrice;
                    lCheeseAmount.BizPrice    = vBizPrice;
                    lCheeseAmount.ProductId   = vProductID;
                    lCheeseAmount.AddedDate   = vAddedDate;
                    lCheeseAmount.AddedBy     = vAddedBy;
                    lCheeseAmount.UpdatedDate = vUpdatedDate;
                    lCheeseAmount.UpdatedBy   = vUpdatedBy;
                    lCheeseAmount.Active      = vActive;
                    return(AddCheeseAmount(lCheeseAmount));
                }
            }
        }
예제 #4
0
        public Category AddCategory(int vCategoryID, int vBizCuisineID, string vTitle, string vDescription, string vImageUrl, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            Category lCategory = new Category();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vCategoryID > 0)
                {
                    lCategory             = frctx.Categories.FirstOrDefault(u => u.CategoryId == vCategoryID);
                    lCategory.Title       = vTitle;
                    lCategory.Description = vDescription;
                    lCategory.ImageUrl    = vImageUrl;

                    lCategory.UpdatedDate = vUpdatedDate;
                    lCategory.UpdatedBy   = vUpdatedBy;
                    lCategory.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lCategory : null);
                }
                else
                {
                    lCategory.BizCuisineId = vBizCuisineID;
                    lCategory.Title        = vTitle;
                    lCategory.Description  = vDescription;
                    lCategory.ImageUrl     = vImageUrl;

                    lCategory.AddedDate   = vAddedDate;
                    lCategory.AddedBy     = vAddedBy;
                    lCategory.UpdatedDate = vUpdatedDate;
                    lCategory.UpdatedBy   = vUpdatedBy;
                    lCategory.Active      = vActive;
                    return(AddCategory(lCategory));
                }
            }
        }
        public RewardVoucher AddRewardVoucher(int vRewardVoucherID, string vTitle, string vDescription, string vImageUrl, decimal vValue, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            RewardVoucher lRewardVoucher = new RewardVoucher();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vRewardVoucherID > 0)
                {
                    lRewardVoucher             = frctx.RewardVouchers.FirstOrDefault(u => u.RewardVoucherId == vRewardVoucherID);
                    lRewardVoucher.Title       = vTitle;
                    lRewardVoucher.Description = vDescription;
                    lRewardVoucher.Value       = vValue;
                    lRewardVoucher.ImageUrl    = vImageUrl;

                    lRewardVoucher.UpdatedDate = vUpdatedDate;
                    lRewardVoucher.UpdatedBy   = vUpdatedBy;
                    lRewardVoucher.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lRewardVoucher : null);
                }
                else
                {
                    lRewardVoucher.Title       = vTitle;
                    lRewardVoucher.Description = vDescription;
                    lRewardVoucher.Value       = vValue;
                    lRewardVoucher.ImageUrl    = vImageUrl;

                    lRewardVoucher.AddedDate   = vAddedDate;
                    lRewardVoucher.AddedBy     = vAddedBy;
                    lRewardVoucher.UpdatedDate = vUpdatedDate;
                    lRewardVoucher.UpdatedBy   = vUpdatedBy;
                    lRewardVoucher.Active      = vActive;
                    return(AddRewardVoucher(lRewardVoucher));
                }
            }
        }
        public CookMethod AddCookMethod(int vCookMethodID, string vTitle, string vDescription, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            CookMethod lCookMethod = new CookMethod();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vCookMethodID > 0)
                {
                    lCookMethod             = frctx.CookMethods.FirstOrDefault(u => u.CookMethodId == vCookMethodID);
                    lCookMethod.Title       = vTitle;
                    lCookMethod.Description = vDescription;

                    lCookMethod.UpdatedDate = vUpdatedDate;
                    lCookMethod.UpdatedBy   = vUpdatedBy;
                    lCookMethod.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lCookMethod : null);
                }
                else
                {
                    lCookMethod.Title       = vTitle;
                    lCookMethod.Description = vDescription;

                    lCookMethod.AddedDate   = vAddedDate;
                    lCookMethod.AddedBy     = vAddedBy;
                    lCookMethod.UpdatedDate = vUpdatedDate;
                    lCookMethod.UpdatedBy   = vUpdatedBy;
                    lCookMethod.Active      = vActive;
                    return(AddCookMethod(lCookMethod));
                }
            }
        }
        public FamilyMeal AddFamilyMeal(int vFamilyMealID, int vProductID, int vNumberOfPeople, string vMealToAdd, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            FamilyMeal lFamilyMeal = new FamilyMeal();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vFamilyMealID > 0)
                {
                    lFamilyMeal = frctx.FamilyMeals.FirstOrDefault(u => u.FamilyMealId == vFamilyMealID);
                    lFamilyMeal.NumberOfPeople = vNumberOfPeople;
                    lFamilyMeal.MealToAdd      = vMealToAdd;

                    lFamilyMeal.UpdatedDate = vUpdatedDate;
                    lFamilyMeal.UpdatedBy   = vUpdatedBy;
                    lFamilyMeal.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lFamilyMeal : null);
                }
                else
                {
                    lFamilyMeal.NumberOfPeople = vNumberOfPeople;
                    lFamilyMeal.MealToAdd      = vMealToAdd;

                    lFamilyMeal.ProductId   = vProductID;
                    lFamilyMeal.AddedDate   = vAddedDate;
                    lFamilyMeal.AddedBy     = vAddedBy;
                    lFamilyMeal.UpdatedDate = vUpdatedDate;
                    lFamilyMeal.UpdatedBy   = vUpdatedBy;
                    lFamilyMeal.Active      = vActive;
                    return(AddFamilyMeal(lFamilyMeal));
                }
            }
        }
예제 #8
0
        public FoodType AddFoodType(int vFoodTypeID, string vTitle, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            FoodType lFoodType = new FoodType();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vFoodTypeID > 0)
                {
                    lFoodType             = frctx.FoodTypes.FirstOrDefault(u => u.FoodTypeId == vFoodTypeID);
                    lFoodType.Title       = vTitle;
                    lFoodType.UpdatedDate = vUpdatedDate;
                    lFoodType.UpdatedBy   = vUpdatedBy;
                    lFoodType.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lFoodType : null);
                }
                else
                {
                    lFoodType.Title       = vTitle;
                    lFoodType.AddedDate   = vAddedDate;
                    lFoodType.AddedBy     = vAddedBy;
                    lFoodType.UpdatedDate = vUpdatedDate;
                    lFoodType.UpdatedBy   = vUpdatedBy;
                    lFoodType.Active      = vActive;
                    return(AddFoodType(lFoodType));
                }
            }
        }
예제 #9
0
        public BizRVInfo AddBizRVInfo(int vBizRVInfoID, int vBizInfoID, string vBizPrice, int vStandingCapacity,
                                      int vSeatedCapacity, string vStartTime, string vEndTime, string vDiningStyle, string vPaymentOptions,
                                      bool vAcceptWalkIn, string vExcutiveChef, string vPrivatePartyFacilities, string vSpecialEvents, string vParking,
                                      string vAdditionalDetails, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            BizRVInfo lBizRVInfo = new BizRVInfo();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vBizRVInfoID > 0)
                {
                    lBizRVInfo.BizPrice               = vBizPrice;
                    lBizRVInfo.StandingCapacity       = vStandingCapacity;
                    lBizRVInfo.SeatedCapacity         = vSeatedCapacity;
                    lBizRVInfo.StartTime              = vStartTime;
                    lBizRVInfo.EndTime                = vEndTime;
                    lBizRVInfo.DiningStyle            = vDiningStyle;
                    lBizRVInfo.PaymentOptions         = vPaymentOptions;
                    lBizRVInfo.AcceptWalkIn           = vAcceptWalkIn;
                    lBizRVInfo.ExecutiveChef          = vExcutiveChef;
                    lBizRVInfo.PrivatePartyFacilities = vPrivatePartyFacilities;
                    lBizRVInfo.SpecialEvents          = vSpecialEvents;
                    lBizRVInfo.Parking                = vParking;
                    lBizRVInfo.AdditionalDetails      = vAdditionalDetails;

                    lBizRVInfo.UpdatedDate = vUpdatedDate;
                    lBizRVInfo.UpdatedBy   = vUpdatedBy;
                    lBizRVInfo.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lBizRVInfo : null);
                }
                else
                {
                    lBizRVInfo.BizPrice               = vBizPrice;
                    lBizRVInfo.StandingCapacity       = vStandingCapacity;
                    lBizRVInfo.SeatedCapacity         = vSeatedCapacity;
                    lBizRVInfo.StartTime              = vStartTime;
                    lBizRVInfo.EndTime                = vEndTime;
                    lBizRVInfo.DiningStyle            = vDiningStyle;
                    lBizRVInfo.PaymentOptions         = vPaymentOptions;
                    lBizRVInfo.AcceptWalkIn           = vAcceptWalkIn;
                    lBizRVInfo.ExecutiveChef          = vExcutiveChef;
                    lBizRVInfo.PrivatePartyFacilities = vPrivatePartyFacilities;
                    lBizRVInfo.SpecialEvents          = vSpecialEvents;
                    lBizRVInfo.Parking                = vParking;
                    lBizRVInfo.AdditionalDetails      = vAdditionalDetails;

                    lBizRVInfo.BizInfoId   = vBizInfoID;
                    lBizRVInfo.AddedDate   = vAddedDate;
                    lBizRVInfo.AddedBy     = vAddedBy;
                    lBizRVInfo.UpdatedDate = vUpdatedDate;
                    lBizRVInfo.UpdatedBy   = vUpdatedBy;
                    lBizRVInfo.Active      = vActive;
                    return(AddBizRVInfo(lBizRVInfo));
                }
            }
        }
예제 #10
0
 private bool ChangeLockState(GiftCard vGiftCard, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         GiftCard up = frenty.GiftCards.FirstOrDefault(e => e.GiftCardId == vGiftCard.GiftCardId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #11
0
 private bool ChangeLockState(Category vCategory, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         Category up = frenty.Categories.FirstOrDefault(e => e.CategoryId == vCategory.CategoryId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #12
0
 private bool ChangeLockState(FamilyMeal vFamilyMeal, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         FamilyMeal up = frenty.FamilyMeals.FirstOrDefault(e => e.FamilyMealId == vFamilyMeal.FamilyMealId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }