public ActionResult Create()
        {
            //Create Item
            City city = new City();

            //AccessRights
            RolesRepository rolesRepository = new RolesRepository();

            if (!hierarchyRepository.AdminHasDomainWriteAccess(groupName))
            {
                ViewData["Message"] = "You do not have access to this item";
                return(View("Error"));
            }

            //StateProvince SelectList
            SelectList stateProvinceList = new SelectList(stateProvinceRepository.GetStateProvincesByCountryCode(city.CountryCode).ToList(), "StateProvinceCode", "Name", city.StateProvinceCode);

            ViewData["StateProvinceList"] = stateProvinceList;

            //TimeZoneRules
            ViewData["TimeZoneRules"] = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc");

            return(View(city));
        }
        // GET: /Create
        public ActionResult Create(int id)
        {
            //Get Item From Database
            PriceTrackingSetupGroup group = new PriceTrackingSetupGroup();

            group = priceTrackingSetupGroupRepository.GetPriceTrackingSetupGroup(id);

            //Check Exists
            if (group == null)
            {
                ViewData["ActionMethod"] = "EditGet";
                return(View("RecordDoesNotExistError"));
            }

            //Check Access Rights to Domain
            if (!hierarchyRepository.AdminHasDomainWriteAccess(groupName))
            {
                ViewData["Message"] = "You do not have access to this item";
                return(View("Error"));
            }

            //Set Access Rights to Admin
            ViewData["AdminAccess"] = "";
            if (hierarchyRepository.AdminHasDomainWriteAccess(adminGroupName))
            {
                ViewData["AdminAccess"] = "WriteAccess";
            }

            //PriceTrackingSetupGroup
            ViewData["PriceTrackingSetupGroupId"]   = group.PriceTrackingSetupGroupId;
            ViewData["PriceTrackingSetupGroupName"] = group.PriceTrackingSetupGroupName;

            //PriceTrackingSetupGroupItemAir
            PriceTrackingSetupGroupItemAir priceTrackingSetupGroupItemAir = new PriceTrackingSetupGroupItemAir();

            priceTrackingSetupGroupItemAir.PriceTrackingSetupGroupId = id;

            //Default Flags
            priceTrackingSetupGroupItemAir.SharedSavingsFlag  = true;
            priceTrackingSetupGroupItemAir.TransactionFeeFlag = false;
            priceTrackingSetupGroupItemAir.RefundableToRefundableWithPenaltyForRefundAllowedFlag = true;
            priceTrackingSetupGroupItemAir.RefundableToNonRefundableAllowedFlag = true;
            priceTrackingSetupGroupItemAir.VoidWindowAllowedFlag = true;
            priceTrackingSetupGroupItemAir.RefundableToRefundableOutsideVoidWindowAllowedFlag       = true;
            priceTrackingSetupGroupItemAir.NonRefundableToNonRefundableOutsideVoidWindowAllowedFlag = true;
            priceTrackingSetupGroupItemAir.ExchangesAllowedFlag    = true;
            priceTrackingSetupGroupItemAir.VoidExchangeAllowedFlag = true;
            priceTrackingSetupGroupItemAir.NonRefundableToLowerNonRefundableWithDifferentChangeFeeAllowedFlag = true;
            priceTrackingSetupGroupItemAir.RefundableToLowerNonRefundableAllowedFlag = true;
            priceTrackingSetupGroupItemAir.RefundableToLowerRefundableAllowedFlag    = true;
            priceTrackingSetupGroupItemAir.NonPenaltyRefundableToLowerPenaltyRefundableAllowedFlag = true;
            priceTrackingSetupGroupItemAir.ChargeChangeFeeUpFrontForSpecificCarriersFlag           = true;
            priceTrackingSetupGroupItemAir.ChangeFeeMustBeUsedFromResidualValueFlag = true;
            priceTrackingSetupGroupItemAir.AutomaticReticketingFlag = true;

            //Pricing Model Defaults
            priceTrackingSetupGroupItemAir.SharedSavingsAmount = 30;

            //Switch Window Defaults
            priceTrackingSetupGroupItemAir.RefundableToRefundablePreDepartureDayAmount    = 5;
            priceTrackingSetupGroupItemAir.RefundableToNonRefundablePreDepartureDayAmount = 5;

            //Reason Codes
            priceTrackingSetupGroupItemAir.RealisedSavingsCode = "XX";
            priceTrackingSetupGroupItemAir.MissedSavingsCode   = "L";

            //Admin Only
            priceTrackingSetupGroupItemAir.AlphaCodeRemarkField = "Y";

            //Currency
            CurrencyRepository currencyRepository = new CurrencyRepository();
            SelectList         currencysList      = new SelectList(currencyRepository.GetAllCurrencies().ToList(), "CurrencyCode", "Name");

            ViewData["Currencies"] = currencysList;

            //Lists

            ViewData["ClientHasProvidedWrittenApprovalFlagList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.ClientHasProvidedWrittenApprovalFlag);

            ViewData["SharedSavingsList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.SharedSavingsFlag);

            ViewData["TransactionFeeList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.TransactionFeeFlag);

            ViewData["CentralFulfillmentTimeZoneRuleCodes"] = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc");

            ViewData["TimeZoneRules"] = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc");

            ViewData["RefundableToRefundableWithPenaltyForRefundAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.RefundableToRefundableWithPenaltyForRefundAllowedFlag);

            ViewData["RefundableToNonRefundableAllowedFlag"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.RefundableToNonRefundableAllowedFlag);

            ViewData["VoidWindowAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.VoidWindowAllowedFlag);

            ViewData["RefundableToRefundableOutsideVoidWindowAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.RefundableToRefundableOutsideVoidWindowAllowedFlag);

            ViewData["NonRefundableToNonRefundableOutsideVoidWindowAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.NonRefundableToNonRefundableOutsideVoidWindowAllowedFlag);

            ViewData["ExchangesAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.ExchangesAllowedFlag);

            ViewData["VoidExchangeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.VoidExchangeAllowedFlag);

            ViewData["ExchangePreviousExchangeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text");

            ViewData["NonRefundableToLowerNonRefundableWithDifferentChangeFeeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text",
                                                                                                                priceTrackingSetupGroupItemAir.NonRefundableToLowerNonRefundableWithDifferentChangeFeeAllowedFlag);

            ViewData["RefundableToLowerNonRefundableAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text",
                                                                                       priceTrackingSetupGroupItemAir.RefundableToLowerNonRefundableAllowedFlag);

            ViewData["RefundableToLowerRefundableAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text",
                                                                                    priceTrackingSetupGroupItemAir.RefundableToLowerRefundableAllowedFlag);

            ViewData["NonPenaltyRefundableToLowerPenaltyRefundableAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text",
                                                                                                     priceTrackingSetupGroupItemAir.NonPenaltyRefundableToLowerPenaltyRefundableAllowedFlag);

            ViewData["ChargeChangeFeeUpFrontForSpecificCarriersFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text",
                                                                                           priceTrackingSetupGroupItemAir.ChargeChangeFeeUpFrontForSpecificCarriersFlag);

            ViewData["ChangeFeeMustBeUsedFromResidualValueFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text",
                                                                                      priceTrackingSetupGroupItemAir.ChangeFeeMustBeUsedFromResidualValueFlag);

            ViewData["TrackPrivateNegotiatedFareFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text");

            ViewData["AutomaticReticketingFlagList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemAir.AutomaticReticketingFlag);

            //System User
            ViewData["SystemUser"] = "";
            string adminUserGuid = User.Identity.Name.Split(new[] { '|' })[0];
            SystemUserRepository systemUserRepository = new SystemUserRepository();
            SystemUser           systemUser           = systemUserRepository.GetUserBySystemUserGuid(adminUserGuid);

            if (systemUser != null)
            {
                string username = systemUser.FirstName + " " + systemUser.LastName;
                ViewData["SystemUser"] = string.Format("{0} - {1}", username, adminUserGuid);
            }

            return(View(priceTrackingSetupGroupItemAir));
        }
Beispiel #3
0
        //
        // GET: /ServiceFund/Create
        public ActionResult Create()
        {
            //Check Access Rights to Domain
            if (!hierarchyRepository.AdminHasDomainWriteAccess(groupName))
            {
                ViewData["Message"] = "You do not have access to this item";
                return(View("Error"));
            }

            ServiceFundVM serviceFundVM = new ServiceFundVM();

            ServiceFund serviceFund = new ServiceFund();

            serviceFundVM.ServiceFund = serviceFund;

            //GDSs
            GDSRepository gdsRepository = new GDSRepository();
            SelectList    gdsList       = new SelectList(gdsRepository.GetAllGDSs().ToList(), "GDSCode", "GDSName");

            serviceFundVM.GDSs = gdsList;

            //Countries
            CountryRepository countryRepository = new CountryRepository();
            SelectList        countries         = new SelectList(countryRepository.GetAllCountries().ToList(), "CountryCode", "CountryName");

            serviceFundVM.Countries = countries;

            //Fund Use Statuses
            FundUseStatusRepository fundUseStatusRepository = new FundUseStatusRepository();
            SelectList fundUseStatusList = new SelectList(fundUseStatusRepository.GetAllFundUseStatuses().ToList(), "Key", "Value");

            serviceFundVM.FundUseStatuses = fundUseStatusList;

            //TimeZoneRules
            TimeZoneRuleRepository timeZoneRuleRepository = new TimeZoneRuleRepository();
            SelectList             timeZoneRules          = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc", "CST/CDT");

            serviceFundVM.TimeZoneRules = timeZoneRules;

            //Products
            ProductRepository productRepository = new ProductRepository();
            SelectList        products          = new SelectList(productRepository.GetAllProducts().ToList(), "ProductId", "ProductName");

            serviceFundVM.Products = products;

            //Suppliers
            SupplierRepository supplierRepository = new SupplierRepository();
            SelectList         suppliers          = new SelectList(supplierRepository.GetAllSuppliers().ToList(), "SupplierCode", "SupplierName");

            serviceFundVM.Suppliers = suppliers;

            //Currencies
            CurrencyRepository currencyRepository = new CurrencyRepository();
            SelectList         currencies         = new SelectList(currencyRepository.GetAllCurrencies().ToList(), "CurrencyCode", "Name");

            serviceFundVM.Currencies = currencies;

            //Service Fund Routings
            ServiceFundRoutingRepository serviceFundRoutingRepository = new ServiceFundRoutingRepository();
            SelectList serviceFundRoutingsList = new SelectList(serviceFundRoutingRepository.GetAllServiceFundRoutings().ToList(), "Key", "Value");

            serviceFundVM.ServiceFundRoutings = serviceFundRoutingsList;

            //ServiceFundChannelTypes
            ServiceFundChannelTypeRepository serviceFundChannelTypeRepository = new ServiceFundChannelTypeRepository();
            SelectList serviceFundChannelTypesList = new SelectList(serviceFundChannelTypeRepository.GetAllServiceFundChannelTypes().ToList(), "ServiceFundChannelTypeId", "ServiceFundChannelTypeName");

            serviceFundVM.ServiceFundChannelTypes = serviceFundChannelTypesList;

            return(View(serviceFundVM));
        }
        // GET: /Create
        public ActionResult Create(int id)
        {
            //Get Item From Database
            PriceTrackingSetupGroup group = new PriceTrackingSetupGroup();

            group = priceTrackingSetupGroupRepository.GetPriceTrackingSetupGroup(id);

            //Check Exists
            if (group == null)
            {
                ViewData["ActionMethod"] = "EditGet";
                return(View("RecordDoesNotExistError"));
            }

            //Check Access Rights to Domain
            if (!hierarchyRepository.AdminHasDomainWriteAccess(groupName))
            {
                ViewData["Message"] = "You do not have access to this item";
                return(View("Error"));
            }

            //Set Access Rights to Admin
            ViewData["AdminAccess"] = "";
            if (hierarchyRepository.AdminHasDomainWriteAccess(adminGroupName))
            {
                ViewData["AdminAccess"] = "WriteAccess";
            }

            //PriceTrackingSetupGroup
            ViewData["PriceTrackingSetupGroupId"]   = group.PriceTrackingSetupGroupId;
            ViewData["PriceTrackingSetupGroupName"] = group.PriceTrackingSetupGroupName;

            //PriceTrackingSetupGroupItemHotel
            PriceTrackingSetupGroupItemHotel priceTrackingSetupGroupItemHotel = new PriceTrackingSetupGroupItemHotel();

            priceTrackingSetupGroupItemHotel.PriceTrackingSetupGroupId = id;

            //Default Flags
            priceTrackingSetupGroupItemHotel.SharedSavingsFlag  = true;
            priceTrackingSetupGroupItemHotel.TransactionFeeFlag = false;

            //Pricing Model Defaults
            priceTrackingSetupGroupItemHotel.SharedSavingsAmount = 30;

            //Threshold Defaults
            priceTrackingSetupGroupItemHotel.EstimatedCWTRebookingFeeAmount = decimal.Parse("0.00");;
            priceTrackingSetupGroupItemHotel.CWTVoidRefundFeeAmount         = decimal.Parse("0.00");
            priceTrackingSetupGroupItemHotel.ThresholdAmount = decimal.Parse("0.00");

            priceTrackingSetupGroupItemHotel.CalculatedTotalThresholdAmount =
                priceTrackingSetupGroupItemHotel.EstimatedCWTRebookingFeeAmount +
                priceTrackingSetupGroupItemHotel.CWTVoidRefundFeeAmount +
                priceTrackingSetupGroupItemHotel.ThresholdAmount;

            //Hotel Amenity Values Defaults
            priceTrackingSetupGroupItemHotel.RoomTypeUpgradeAllowedFlag           = true;
            priceTrackingSetupGroupItemHotel.BeddingTypeUpgradeAllowedFlag        = true;
            priceTrackingSetupGroupItemHotel.HotelRateCodeUpgradeAllowedFlag      = true;
            priceTrackingSetupGroupItemHotel.NegotiatedUpgradeAllowedFlag         = true;
            priceTrackingSetupGroupItemHotel.CancellationPolicyUpgradeAllowedFlag = true;
            priceTrackingSetupGroupItemHotel.KingQueenUpgradeAllowedFlag          = true;

            //Rate Codes
            priceTrackingSetupGroupItemHotel.CWTRateTrackingCode1 = "CWT";
            priceTrackingSetupGroupItemHotel.CWTRateTrackingCode2 = "CWV";

            //Admin Only
            priceTrackingSetupGroupItemHotel.AlphaCodeRemarkField = "Y";

            //Currency
            CurrencyRepository currencyRepository = new CurrencyRepository();
            SelectList         currencysList      = new SelectList(currencyRepository.GetAllCurrencies().ToList(), "CurrencyCode", "Name");

            ViewData["Currencies"] = currencysList;

            //Lists

            ViewData["ClientHasProvidedWrittenApprovalFlagList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.ClientHasProvidedWrittenApprovalFlag);

            ViewData["ClientHasHotelFeesInMSAFlagList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.ClientHasHotelFeesInMSAFlag);

            ViewData["ClientUsesConfermaVirtualCardsFlagList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.ClientUsesConfermaVirtualCardsFlag);

            ViewData["CentralFulfillmentTimeZoneRuleCodes"] = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc");

            ViewData["TimeZoneRules"] = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc");

            ViewData["SharedSavingsList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.SharedSavingsFlag);

            ViewData["TransactionFeeList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.TransactionFeeFlag);

            ViewData["RoomTypeUpgradeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.RoomTypeUpgradeAllowedFlag);

            ViewData["BeddingTypeUpgradeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.BeddingTypeUpgradeAllowedFlag);

            ViewData["HotelRateCodeUpgradeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.HotelRateCodeUpgradeAllowedFlag);

            ViewData["CancellationPolicyUpgradeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.CancellationPolicyUpgradeAllowedFlag);

            ViewData["KingQueenUpgradeAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.KingQueenUpgradeAllowedFlag);

            ViewData["BreakfastChangesAllowedFlagList"] = new SelectList(commonRepository.GetAllowedNotAllowedList().ToList(), "Value", "Text", priceTrackingSetupGroupItemHotel.BreakfastChangesAllowedFlag);

            ViewData["EnableValueTrackingFlagList"] = new SelectList(commonRepository.GetTrueFalseList().ToList(), "Value", "Text");

            //System User
            ViewData["SystemUser"] = "";
            string adminUserGuid = User.Identity.Name.Split(new[] { '|' })[0];
            SystemUserRepository systemUserRepository = new SystemUserRepository();
            SystemUser           systemUser           = systemUserRepository.GetUserBySystemUserGuid(adminUserGuid);

            if (systemUser != null)
            {
                string username = systemUser.FirstName + " " + systemUser.LastName;
                ViewData["SystemUser"] = string.Format("{0} - {1}", username, adminUserGuid);
            }

            return(View(priceTrackingSetupGroupItemHotel));
        }
Beispiel #5
0
        // GET: /ServiceFund/Edit
        public ActionResult Edit(int id)
        {
            //Get Item From Database
            ServiceFund serviceFund = new ServiceFund();

            serviceFund = serviceFundRepository.GetServiceFund(id);

            //Check Exists
            if (serviceFund == null)
            {
                ViewData["ActionMethod"] = "EditGet";
                return(View("RecordDoesNotExistError"));
            }

            //Check Access Rights to Domain
            if (!hierarchyRepository.AdminHasDomainWriteAccess(groupName))
            {
                ViewData["Message"] = "You do not have access to this item";
                return(View("Error"));
            }

            ServiceFundVM serviceFundVM = new ServiceFundVM();

            serviceFundVM.ServiceFund = serviceFund;

            //GDSs
            GDSRepository gdsRepository = new GDSRepository();
            SelectList    gdsList       = new SelectList(gdsRepository.GetAllGDSs().ToList(), "GDSCode", "GDSName", serviceFund.GDSCode);

            serviceFundVM.GDSs = gdsList;

            //Countries
            CountryRepository countryRepository = new CountryRepository();
            SelectList        countries         = new SelectList(countryRepository.GetAllCountries().ToList(), "CountryCode", "CountryName", serviceFund.PCCCountryCode);

            serviceFundVM.Countries = countries;

            //Fund Use Statuses
            FundUseStatusRepository fundUseStatusRepository = new FundUseStatusRepository();
            SelectList fundUseStatusList = new SelectList(fundUseStatusRepository.GetAllFundUseStatuses().ToList(), "Key", "Value", serviceFund.FundUseStatus);

            serviceFundVM.FundUseStatuses = fundUseStatusList;

            //TimeZoneRules
            TimeZoneRuleRepository timeZoneRuleRepository = new TimeZoneRuleRepository();
            SelectList             timeZoneRules          = new SelectList(timeZoneRuleRepository.GetAllTimeZoneRules().ToList(), "TimeZoneRuleCode", "TimeZoneRuleCodeDesc", serviceFund.TimeZoneRuleCode);

            serviceFundVM.TimeZoneRules = timeZoneRules;

            //Products
            ProductRepository productRepository = new ProductRepository();
            SelectList        products          = new SelectList(productRepository.GetAllProducts().ToList(), "ProductId", "ProductName", serviceFund.ProductId);

            serviceFundVM.Products = products;

            //Suppliers
            SupplierRepository supplierRepository = new SupplierRepository();
            SelectList         suppliers          = new SelectList(supplierRepository.GetAllSuppliers().ToList(), "SupplierCode", "SupplierName", serviceFund.SupplierName);

            serviceFundVM.Suppliers = suppliers;

            //Currencies
            CurrencyRepository currencyRepository = new CurrencyRepository();
            SelectList         currencies         = new SelectList(currencyRepository.GetAllCurrencies().ToList(), "CurrencyCode", "Name", serviceFund.ServiceFundCurrencyCode);

            serviceFundVM.Currencies = currencies;

            //Service Fund Routings
            ServiceFundRoutingRepository serviceFundRoutingRepository = new ServiceFundRoutingRepository();
            SelectList serviceFundRoutingsList = new SelectList(serviceFundRoutingRepository.GetAllServiceFundRoutings().ToList(), "Key", "Value", serviceFund.ServiceFundRouting);

            serviceFundVM.ServiceFundRoutings = serviceFundRoutingsList;

            //ServiceFundChannelTypes
            ServiceFundChannelTypeRepository serviceFundChannelTypeRepository = new ServiceFundChannelTypeRepository();
            SelectList serviceFundChannelTypesList = new SelectList(serviceFundChannelTypeRepository.GetAllServiceFundChannelTypes().ToList(), "ServiceFundChannelTypeId", "ServiceFundChannelTypeName", serviceFund.ServiceFundChannelTypeId);

            serviceFundVM.ServiceFundChannelTypes = serviceFundChannelTypesList;

            serviceFundRepository.EditGroupForDisplay(serviceFund);

            return(View(serviceFundVM));
        }