public ImplementAgenciesResponse GetImplementAgencies([FromBody] BaseRequest request) { ImplementAgenciesResponse response = new ImplementAgenciesResponse(); try { if (!BAplication.ValidateAplicationToken(request.ApplicationToken)) { response.Code = "2"; response.Message = Messages.ApplicationTokenNoAutorize; return(response); } List <MImplementAgency> ImplementAgencies = BImplementAgency.List(); response.ImplementAgencies = ImplementAgencies.ToArray(); response.Code = "0"; response.Message = "Success"; } catch (Exception ex) { response.Code = "2"; response.Message = ex.Message; } return(response); }
public ProjectFinancialPropertiesResponse ProjectFinancialProperties([FromBody] BaseRequest request) { ProjectFinancialPropertiesResponse response = new ProjectFinancialPropertiesResponse(); List <MDeparment> deparments = new List <MDeparment>(); List <MFund> funds = new List <MFund>(); List <MImplementAgency> implementAgencies = new List <MImplementAgency>(); try { if (!BAplication.ValidateAplicationToken(request.ApplicationToken)) { response.Code = "2"; response.Message = Messages.ApplicationTokenNoAutorize; return(response); } deparments = BDeparment.List(); funds = BFund.List(); implementAgencies = BImplementAgency.List(); response.Code = "0"; response.Message = "Success"; response.Deparments = deparments.ToArray(); response.Funds = funds.ToArray(); response.ImplementAgencies = implementAgencies.ToArray(); } catch (Exception ex) { response.Code = "2"; response.Message = ex.Message; } return(response); }