public ActionResult BranchDistributorAgentEdit(int?id) { _model = _rep.Detail(id, out _res); TempData["InfoMessage"] = _res.ActionMessage; if (_res.ErrNumber == 0) { ViewData["AgentBank"] = _agentdetailsprovider.GetAgentBankList(id.Value); foreach (var AsociatedProductOfAgent in _model.AgentProductList) { ViewData[AsociatedProductOfAgent.ProductName] = new SelectList(_rep.GetAllRolesListonProductWise(AsociatedProductOfAgent.ProductId), "RoleName", "RoleName", ""); } ViewData["Countrylist"] = new SelectList(_rep.GetCountry(), "CountryId", "CountryName", _rep.GetCountryInfo(_model.NativeCountryId)); ViewData["AgentZone"] = new SelectList(_rep.GetZoneList(), "ZoneId", "ZoneName", _model.ZoneId); ViewData["AgentDistrict"] = new SelectList(_rep.GetDistrictListbyZoneId(_model.ZoneId), "DistrictId", "DistrictName", _model.DistrictId); ViewData["Status"] = new SelectList(_rep.GetStatus(), "id", "Name"); ViewData["AgentTypes"] = new SelectList(_rep.GetAgentType(), "AgentTypeId", "AgentTypeName", _model.AgentTypeId); ViewData["Banks"] = new SelectList(_rep.GetbankInformation(), "BankId", "BankName"); ViewData["BankBranches"] = new SelectList(_rep.GetbankBranchInformation(), "BankBranchId", "BranchName"); ViewData["BankAccountTypes"] = new SelectList(_rep.GetbankAccountType(), "BankAccountTypeId", "AccountTypeName"); ViewData["TimeZones"] = new SelectList(_rep.GetTimeZoneList(), "RecordID", "StandardName"); _model.AgentId = (int)id; return(View(_model)); } else { return(RedirectToAction("Index")); } }
public ActionResult Create() { ViewData["Countrylist"] = new SelectList(_rep.GetCountry(), "CountryId", "CountryName", 0); ViewData["Status"] = new SelectList(_rep.GetStatus(), "id", "Name", 1); ViewData["AirlineGroup"] = new SelectList(_rep.GetAirlineGroup(), "AirlineGroupId", "AirlineGroupName"); AgentModel viewmodel = new AgentModel { agentsettinglist = _rep.GetAllSettingList(), ProductBaseRoleList = _rep.GetProductList(), ReferredByList = _rep.GetAllGetSalesAgentList(), MEsNameList = _rep.GetAllGetSalesAgentList(), // MasterDealNameListOfAirlines = _rep.GetAllDealListOfAirlines(), // MasterDealNameListOfHotels=_rep.GetAllDealListOfHotel(), }; /////// TODO : Repalce View data into Strongly Type Model ViewData ///////////// ViewData["AirlineGroup"] = new SelectList(_rep.GetAirlineGroup(), "AirlineGroupId", "AirlineGroupName"); ViewData["RoleAssign"] = new SelectList("", "RoleName", "RoleName", ""); ViewData["AgentTypes"] = new SelectList(_rep.GetAgentType(), "AgentTypeId", "AgentTypeName"); ViewData["AgentZone"] = new SelectList(_rep.GetZoneList(), "ZoneId", "ZoneName"); ViewData["AgentDistrict"] = new SelectList(_rep.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); ViewData["BankAccountTypes"] = new SelectList(_rep.GetbankAccountType(), "BankAccountTypeId", "AccountTypeName"); ViewData["TimeZones"] = new SelectList(_rep.GetTimeZoneList(), "RecordID", "StandardName", 66); return(View(viewmodel)); }
public ActionResult Create() { ViewData["Countrylist"] = new SelectList(_rep.GetCountry(), "CountryId", "CountryName", 0); ViewData["Status"] = new SelectList(_rep.GetStatus(), "id", "Name", 1); ViewData["AirlineGroup"] = new SelectList(_rep.GetAirlineGroup(), "AirlineGroupId", "AirlineGroupName"); AgentModel viewmodel = new AgentModel { agentsettinglist = _rep.GetAllSettingList(), ProductBaseRoleList = _rep.GetProductList(), }; ViewData["AirlineGroup"] = new SelectList(_rep.GetAirlineGroup(), "AirlineGroupId", "AirlineGroupName"); ViewData["RoleAssign"] = new SelectList("", "RoleName", "RoleName", ""); ViewData["AgentTypes"] = new SelectList(_rep.GetAgentType(), "AgentTypeId", "AgentTypeName"); ViewData["AgentZone"] = new SelectList(_rep.GetZoneList(), "ZoneId", "ZoneName"); ViewData["AgentDistrict"] = new SelectList(_rep.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); ViewData["BankAccountTypes"] = new SelectList(_rep.GetbankAccountType(), "BankAccountTypeId", "AccountTypeName"); ViewData["TimeZones"] = new SelectList(_rep.GetTimeZoneList(), "RecordID", "StandardName", 66); return(View(viewmodel)); }
public MassEmailingModel GetMassEmailingModel(MassEmailingModel model) { ATLTravelPortal.Areas.Airline.Repository.MasterDealProvider mDealProvider = new ATLTravelPortal.Areas.Airline.Repository.MasterDealProvider(); AgentManagementRepository agentManagementRepository = new AgentManagementRepository(); MassEmailingModel massEmailingModel = new MassEmailingModel(); massEmailingModel.AgentClasses = GetAllAgentClasses(); massEmailingModel.AgentDeals = mDealProvider.GetAllDealMasterForAgentClassList(1); massEmailingModel.Zones = new SelectList(agentManagementRepository.GetZoneList(), "ZoneId", "ZoneName"); massEmailingModel.Districts = new SelectList(agentManagementRepository.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); massEmailingModel.AgentTypes = new SelectList(agentManagementRepository.GetAgentType(), "AgentTypeId", "AgentTypeName"); if (model != null) { massEmailingModel.MessageType = model.MessageType; } return(massEmailingModel); }