public async Task <MasterData> Handle(Query request, CancellationToken cancellationToken) { var master = new MasterData() { }; switch (request.Page) { case "search": master = new MasterSearchData { Statuses = await this.GetStatuses(cancellationToken), UserTypes = await this.GetUserTypes(cancellationToken) }; break; case "detail": master = new MasterSaveData { Policies = await this.GetPolicies(cancellationToken), Profiles = await this.GetProfiles(cancellationToken) }; break; case "permission": master = new MasterPermissionData { Companies = await this.GetCompanies(cancellationToken) }; break; case "division": master = new MasterDivisionData { Divisions = await this.GetDivisions(request.CompanyCode, cancellationToken), }; break; case "eduLevel": master = new MasterEduLevelData { TypeLevels = await this.GetTypeLevels(request.CompanyCode, cancellationToken) }; break; } return(master); }
public async Task <MasterData> Handle(Query request, CancellationToken cancellationToken) { var master = new MasterData() { }; switch (request.Page) { case "search": master = new MasterSearchData { Divlist = await this.GetDiv(cancellationToken), GroupTypeCode = await this.GetGroupTypeCode(cancellationToken), StatusWork = await this.GetStatusWork(cancellationToken), }; break; case "detail": master = new MasterDetailData { PreNames = await this.GetPrename(cancellationToken), //tab Prosonallity Genders = await this.GetGender(cancellationToken), Races = await this.GetRace(cancellationToken), Nationalitys = await this.GetNationality(cancellationToken), Religions = await this.GetReligion(cancellationToken), AddressProvinces = await this.GetProvince(cancellationToken), //tab Worker EmployeeTypes = await this.GetEmployeeType(cancellationToken), Divlists = await this.GetDiv(cancellationToken), PositionLevels = await this.GetPositionLevel(cancellationToken), Positionlist = await this.GetPosition(cancellationToken), GroupTypeCode = await this.GetGroupTypeCode(cancellationToken), PositionDivisions = await this.GetPositionDivision(cancellationToken), JobTypes = await this.GetJobType(cancellationToken), DivWork = await this.GetDivWork(cancellationToken), }; break; } return(master); }