Exemple #1
0
        public ActionResult Create(int id, int?FilterDealIdentifierId, string FilterDealIdentifierText, int?FilterHotelId, int?FilterCurrencyId)
        {
            TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"];

            HotelInfoRepository hotelInfoRepository = new HotelInfoRepository();

            var hotelInfo = hotelInfoRepository.GetHotelInfoByHotelID(FilterHotelId ?? 0);
            BranchDealViewModel viewmodel = new BranchDealViewModel();

            viewmodel.HotelNameList      = hotelDealRepository.GetAllHotelList();
            viewmodel.DealMasterList     = mDealProvider.GetAllBranchDealMasterList(2, obj.LoginTypeId);
            viewmodel.DealMasterId       = id;
            viewmodel.DealMaserText      = mDealProvider.GetBranchDealMasterById(id).BranchDealName;
            viewmodel.DealIdentifierId   = FilterDealIdentifierId != null ? FilterDealIdentifierId.Value : 0;
            viewmodel.DealIdentifierText = FilterDealIdentifierText;
            viewmodel.CurrencyId         = FilterCurrencyId != null ? FilterCurrencyId.Value : 0;
            viewmodel.HotelId            = FilterHotelId;
            viewmodel.AirlineName        = hotelInfo != null ? hotelInfo.HotelName : string.Empty;
            viewmodel.CurrencyList       = mDealProvider.GetCurrencyList();

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("CreateDeal", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }