public ActionResult Create() { DistributorManagementModel model = new DistributorManagementModel(); try { model.Countries = new SelectList(agentManagementProvider.GetCountry(), "CountryId", "CountryName", 0); model.StatusOption = new SelectList(agentManagementProvider.GetStatus(), "id", "Name", 1); model.Zones = new SelectList(agentManagementProvider.GetZoneList(), "ZoneId", "ZoneName"); model.Districts = new SelectList(agentManagementProvider.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); model.TimeZones = new SelectList(agentManagementProvider.GetTimeZoneList(), "RecordID", "StandardName", 66); model.BranchOffices = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName"); return(View(model)); } catch (Exception ex) { model.Countries = new SelectList(agentManagementProvider.GetCountry(), "CountryId", "CountryName", 0); model.StatusOption = new SelectList(agentManagementProvider.GetStatus(), "id", "Name", 1); model.Zones = new SelectList(agentManagementProvider.GetZoneList(), "ZoneId", "ZoneName"); model.Districts = new SelectList(agentManagementProvider.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); model.TimeZones = new SelectList(agentManagementProvider.GetTimeZoneList(), "RecordID", "StandardName", 66); model.BranchOffices = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName"); TempData["ActionResponse"] = ex.Message; return(View(model)); } }
public ActionResult Create() { DistributorManagementModel model = new DistributorManagementModel(); TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; try { model.Countries = new SelectList(agentManagementProvider.GetCountry(), "CountryId", "CountryName", 0); model.StatusOption = new SelectList(agentManagementProvider.GetStatus(), "id", "Name", 1); model.Zones = new SelectList(agentManagementProvider.GetZoneList(), "ZoneId", "ZoneName"); model.Districts = new SelectList(agentManagementProvider.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); model.TimeZones = new SelectList(agentManagementProvider.GetTimeZoneList(), "RecordID", "StandardName", 66); model.BranchOffices = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName"); model.MasterDealNameListOfAirlines = provider.GetAllBranchDistributorDealListOfAirlines(obj.LoginTypeId); model.MasterDealNameListOfHotels = provider.GetAllBranchDistributorDealListOfHotels(obj.LoginTypeId); model.MasterDealNameListOfBus = provider.GetAllBranchDistributorDealListOfBus(obj.LoginTypeId); model.MasterDealNameListOfMobile = provider.GetAllBranchDistributorDealListOfMobile(obj.LoginTypeId); ViewData["distributorClass"] = new SelectList(provider.GetDistributorClass(), "DistributorClassId", "DistributorClassName"); model.DistributorClassId = provider.GeDistributorClass(obj.LoginTypeId); return(View(model)); } catch (Exception ex) { model.Countries = new SelectList(agentManagementProvider.GetCountry(), "CountryId", "CountryName", 0); model.StatusOption = new SelectList(agentManagementProvider.GetStatus(), "id", "Name", 1); model.Zones = new SelectList(agentManagementProvider.GetZoneList(), "ZoneId", "ZoneName"); model.Districts = new SelectList(agentManagementProvider.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); model.TimeZones = new SelectList(agentManagementProvider.GetTimeZoneList(), "RecordID", "StandardName", 66); model.BranchOffices = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName"); model.MasterDealNameListOfAirlines = provider.GetAllBranchDistributorDealListOfAirlines(obj.LoginTypeId); model.MasterDealNameListOfHotels = provider.GetAllBranchDistributorDealListOfHotels(obj.LoginTypeId); model.MasterDealNameListOfBus = provider.GetAllBranchDistributorDealListOfBus(obj.LoginTypeId); model.MasterDealNameListOfMobile = provider.GetAllBranchDistributorDealListOfMobile(obj.LoginTypeId); ViewData["distributorClass"] = new SelectList(provider.GetDistributorClass(), "DistributorClassId", "DistributorClassName"); model.DistributorClassId = provider.GeDistributorClass(obj.LoginTypeId); TempData["ActionResponse"] = ex.Message; return(View(model)); } }
public ActionResult Create() { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string BranchCode = mDealProvider.GetBranchCodeByBranchId(obj.LoginTypeId); MasterBranchDealviewModel viewmodel = new MasterBranchDealviewModel() { DealMasterList = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId), BranchOffices = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName"), BranchOfficeCode = BranchCode }; if (Request != null && Request.IsAjaxRequest()) { return(PartialView("VUC_CreateNewDeal", viewmodel)); } else { return(View(viewmodel)); } }