예제 #1
0
        public CrustChoice AddCrustChoice(int vCrustChoiceID, int vProductID, string vTitle, string vDescription, decimal vPrice, decimal vBizPrice, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            CrustChoice lCrustChoice = new CrustChoice();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vCrustChoiceID > 0)
                {
                    lCrustChoice             = frctx.CrustChoices.FirstOrDefault(u => u.CrustChoiceId == vCrustChoiceID);
                    lCrustChoice.Title       = vTitle;
                    lCrustChoice.Description = vDescription;
                    lCrustChoice.Price       = vPrice;
                    lCrustChoice.BizPrice    = vBizPrice;
                    lCrustChoice.UpdatedDate = vUpdatedDate;
                    lCrustChoice.UpdatedBy   = vUpdatedBy;
                    lCrustChoice.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lCrustChoice : null);
                }
                else
                {
                    lCrustChoice.Title       = vTitle;
                    lCrustChoice.Description = vDescription;
                    lCrustChoice.Price       = vPrice;
                    lCrustChoice.BizPrice    = vBizPrice;
                    lCrustChoice.AddedDate   = vAddedDate;
                    lCrustChoice.AddedBy     = vAddedBy;
                    lCrustChoice.ProductId   = vProductID;
                    lCrustChoice.UpdatedDate = vUpdatedDate;
                    lCrustChoice.UpdatedBy   = vUpdatedBy;
                    lCrustChoice.Active      = vActive;
                    return(AddCrustChoice(lCrustChoice));
                }
            }
        }
예제 #2
0
        public MealSection AddMealSection(int vMealSectionID, string vTitle, string vDescription, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            MealSection lMealSection = new MealSection();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vMealSectionID > 0)
                {
                    lMealSection             = frctx.MealSections.FirstOrDefault(u => u.MealSectionId == vMealSectionID);
                    lMealSection.Title       = vTitle;
                    lMealSection.Description = vDescription;

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

                    lMealSection.AddedDate   = vAddedDate;
                    lMealSection.AddedBy     = vAddedBy;
                    lMealSection.UpdatedDate = vUpdatedDate;
                    lMealSection.UpdatedBy   = vUpdatedBy;
                    lMealSection.Active      = vActive;
                    return(AddMealSection(lMealSection));
                }
            }
        }
예제 #3
0
        public ZoneName AddZoneName(int vZoneNameID, string vTitle, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            ZoneName lZoneName = new ZoneName();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vZoneNameID > 0)
                {
                    lZoneName       = frctx.ZoneNames.FirstOrDefault(u => u.ZoneNameId == vZoneNameID);
                    lZoneName.Title = vTitle;

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

                    lZoneName.AddedDate   = vAddedDate;
                    lZoneName.AddedBy     = vAddedBy;
                    lZoneName.UpdatedDate = vUpdatedDate;
                    lZoneName.UpdatedBy   = vUpdatedBy;
                    lZoneName.Active      = vActive;
                    return(AddZoneName(lZoneName));
                }
            }
        }
        public DayOfClose AddDayOfClose(int vDayOfCloseID, int vBizInfoID, string vTitle, DateTime vCloseDay, int vZoneNameID, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            DayOfClose lDayOfClose = new DayOfClose();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vDayOfCloseID > 0)
                {
                    lDayOfClose            = frctx.DayOfCloses.FirstOrDefault(u => u.DayOfCloseId == vDayOfCloseID);
                    lDayOfClose.Title      = vTitle;
                    lDayOfClose.CloseDay   = vCloseDay;
                    lDayOfClose.ZoneNameId = vZoneNameID;

                    lDayOfClose.UpdatedDate = vUpdatedDate;
                    lDayOfClose.UpdatedBy   = vUpdatedBy;
                    lDayOfClose.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lDayOfClose : null);
                }
                else
                {
                    lDayOfClose.Title      = vTitle;
                    lDayOfClose.CloseDay   = vCloseDay;
                    lDayOfClose.ZoneNameId = vZoneNameID;

                    lDayOfClose.AddedDate   = vAddedDate;
                    lDayOfClose.AddedBy     = vAddedBy;
                    lDayOfClose.BizInfoId   = vBizInfoID;
                    lDayOfClose.UpdatedDate = vUpdatedDate;
                    lDayOfClose.UpdatedBy   = vUpdatedBy;
                    lDayOfClose.Active      = vActive;
                    return(AddDayOfClose(lDayOfClose));
                }
            }
        }
        public SideChoice AddSideChoice(int vSideChoiceID, int vProductID, string vTitle, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            SideChoice lSideChoice = new SideChoice();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vSideChoiceID > 0)
                {
                    lSideChoice       = frctx.SideChoices.FirstOrDefault(u => u.SideChoiceId == vSideChoiceID);
                    lSideChoice.Title = vTitle;

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

                    lSideChoice.ProductId   = vProductID;
                    lSideChoice.AddedDate   = vAddedDate;
                    lSideChoice.AddedBy     = vAddedBy;
                    lSideChoice.UpdatedDate = vUpdatedDate;
                    lSideChoice.UpdatedBy   = vUpdatedBy;
                    lSideChoice.Active      = vActive;
                    return(AddSideChoice(lSideChoice));
                }
            }
        }
예제 #6
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));
                }
            }
        }
예제 #7
0
        public ConvertedPoint AddConvertedPoint(int vConvertedPointID, string vUserID, int vRewardVoucherID, int vConvertedPoints, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            ConvertedPoint lConvertedPoint = new ConvertedPoint();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vConvertedPointID > 0)
                {
                    lConvertedPoint = frctx.ConvertedPoints.FirstOrDefault(u => u.ConvertedPointId == vConvertedPointID);

                    lConvertedPoint.ConvertedPoints = vConvertedPoints;

                    lConvertedPoint.UpdatedDate = vUpdatedDate;
                    lConvertedPoint.UpdatedBy   = vUpdatedBy;
                    lConvertedPoint.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lConvertedPoint : null);
                }
                else
                {
                    lConvertedPoint.ConvertedPoints = vConvertedPoints;

                    lConvertedPoint.UserId = vUserID;

                    lConvertedPoint.RewardVoucherId = vRewardVoucherID;
                    lConvertedPoint.AddedDate       = vAddedDate;
                    lConvertedPoint.AddedBy         = vAddedBy;
                    lConvertedPoint.UpdatedDate     = vUpdatedDate;
                    lConvertedPoint.UpdatedBy       = vUpdatedBy;
                    lConvertedPoint.Active          = vActive;
                    return(AddConvertedPoint(lConvertedPoint));
                }
            }
        }
예제 #8
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));
                }
            }
        }
예제 #9
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));
                }
            }
        }
        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));
                }
            }
        }
예제 #11
0
        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));
                }
            }
        }
예제 #12
0
        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));
                }
            }
        }
예제 #13
0
        public BizCuisine AddBizCuisine(int vBizCuisineID, int vBizInfoID, int vCuisineTypeID, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            BizCuisine lBizCuisine = new BizCuisine();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vBizCuisineID > 0)
                {
                    lBizCuisine             = frctx.BizCuisines.FirstOrDefault(u => u.BizCuisineId == vBizCuisineID);
                    lBizCuisine.UpdatedDate = vUpdatedDate;
                    lBizCuisine.UpdatedBy   = vUpdatedBy;
                    lBizCuisine.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lBizCuisine : null);
                }
                else
                {
                    lBizCuisine.AddedDate     = vAddedDate;
                    lBizCuisine.AddedBy       = vAddedBy;
                    lBizCuisine.BizInfoId     = vBizInfoID;
                    lBizCuisine.CuisineTypeId = vCuisineTypeID;
                    lBizCuisine.UpdatedDate   = vUpdatedDate;
                    lBizCuisine.UpdatedBy     = vUpdatedBy;
                    lBizCuisine.Active        = vActive;
                    return(AddBizCuisine(lBizCuisine));
                }
            }
        }
예제 #14
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));
                }
            }
        }
        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));
                }
            }
        }
예제 #16
0
        public HotelType AddHotelType(int vHotelTypeID, string vName, string vImageUrl, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            HotelType lHotelType = new HotelType();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vHotelTypeID > 0)
                {
                    lHotelType             = frctx.HotelTypes.FirstOrDefault(u => u.HotelTypeId == vHotelTypeID);
                    lHotelType.Name        = vName;
                    lHotelType.ImageUrl    = vImageUrl;
                    lHotelType.UpdatedDate = vUpdatedDate;
                    lHotelType.UpdatedBy   = vUpdatedBy;
                    lHotelType.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lHotelType : null);
                }
                else
                {
                    lHotelType.Name        = vName;
                    lHotelType.ImageUrl    = vImageUrl;
                    lHotelType.AddedDate   = vAddedDate;
                    lHotelType.AddedBy     = vAddedBy;
                    lHotelType.UpdatedDate = vUpdatedDate;
                    lHotelType.UpdatedBy   = vUpdatedBy;
                    lHotelType.Active      = vActive;
                    return(AddHotelType(lHotelType));
                }
            }
        }
        public FavorRestaurant AddFavorRestaurant(int vFavorRestaurantID, string vUserId, int vBizInfoId, DateTime vAddedDate, string vAddedBy, DateTime vUpdatedDate, string vUpdatedBy, bool vActive)
        {
            FavorRestaurant lFavorRestaurant = new FavorRestaurant();

            using (FRShoppingEntities frctx = new FRShoppingEntities())
            {
                if (vFavorRestaurantID > 0)
                {
                    lFavorRestaurant             = frctx.FavorRestaurants.FirstOrDefault(u => u.FavorRestaurantId == vFavorRestaurantID);
                    lFavorRestaurant.UpdatedDate = vUpdatedDate;
                    lFavorRestaurant.UpdatedBy   = vUpdatedBy;
                    lFavorRestaurant.Active      = vActive;
                    return(frctx.SaveChanges() > 0 ? lFavorRestaurant : null);
                }
                else
                {
                    lFavorRestaurant.BizInfoId   = vBizInfoId;
                    lFavorRestaurant.UserId      = vUserId;
                    lFavorRestaurant.AddedDate   = vAddedDate;
                    lFavorRestaurant.AddedBy     = vAddedBy;
                    lFavorRestaurant.UpdatedDate = vUpdatedDate;
                    lFavorRestaurant.UpdatedBy   = vUpdatedBy;
                    lFavorRestaurant.Active      = vActive;
                    return(AddFavorRestaurant(lFavorRestaurant));
                }
            }
        }
예제 #18
0
 private bool ChangeLockState(BizImage vBizImage, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         BizImage up = frenty.BizImages.FirstOrDefault(e => e.BizImageId == vBizImage.BizImageId);
         up.Active = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #19
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));
                }
            }
        }
예제 #20
0
 private bool ChangeLockState(BizCuisine vBizCuisine, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         BizCuisine up = frenty.BizCuisines.FirstOrDefault(e => e.BizCuisineId == vBizCuisine.BizCuisineId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #21
0
 private bool ChangeLockState(Product vProduct, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         Product up = frenty.Products.FirstOrDefault(e => e.ProductId == vProduct.ProductId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #22
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);
     }
 }
예제 #23
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);
     }
 }
예제 #24
0
 private bool ChangeLockState(ConvertedPoint vConvertedPoint, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         ConvertedPoint up = frenty.ConvertedPoints.FirstOrDefault(e => e.ConvertedPointId == vConvertedPoint.ConvertedPointId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #25
0
 private bool ChangeLockState(Driver vDriver, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         Driver up = frenty.Drivers.FirstOrDefault(e => e.DriverId == vDriver.DriverId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #26
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);
     }
 }
예제 #27
0
 private bool ChangeLockState(SideChoice vSideChoice, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         SideChoice up = frenty.SideChoices.FirstOrDefault(e => e.SideChoiceId == vSideChoice.SideChoiceId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #28
0
 private bool ChangeLockState(HotelType vHotelType, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         HotelType up = frenty.HotelTypes.FirstOrDefault(e => e.HotelTypeId == vHotelType.HotelTypeId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #29
0
 private bool ChangeLockState(FreeItemCoupon vFreeItemCoupon, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         FreeItemCoupon up = frenty.FreeItemCoupons.FirstOrDefault(e => e.FreeItemId == vFreeItemCoupon.FreeItemId);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }
예제 #30
0
 private bool ChangeLockState(AspNetUser vUser, bool vState)
 {
     using (FRShoppingEntities frenty = new FRShoppingEntities())
     {
         AspNetUser up = frenty.AspNetUsers.FirstOrDefault(e => e.UserName == vUser.UserName);
         up.UpdatedDate = DateTime.Now;
         up.Active      = vState;
         return(frenty.SaveChanges() > 0 ? true : false);
     }
 }