コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }