public EFile GetCompanyLogoByURL([FromBody] string url) { var eCompany = SCompanies.GetByLabSite(url); if (eCompany == null) { SLogger.LogError("(GetCompanyLogoByURL)não foi possível encontrar pela url: " + url); return(null); } EFile eFile = SFiles.GetCompanyLogo(eCompany.id); eFile.companyName = eCompany.name; eFile.contentBase64 = Convert.ToBase64String(eFile.content); return(eFile); }
static public List <EModule> GetAllByCompany(string companyID) { ECompany eCompany = SCompanies.GetByID(companyID); List <EModule> returnList = GetAllModulesAvailable(); List <int> modulesUsed = eCompany.modulesUsed.Split(",").ToList().Select(int.Parse).ToList(); foreach (EModule eModule in returnList) { foreach (int moduleUsed in modulesUsed) { if (eModule.moduleType != moduleUsed) { continue; } eModule.enabled = true; break; } } return(returnList); }
public async Task <IActionResult> Save([FromBody] ECompany eCompany) { string id = await SCompanies.Save(eCompany); return(Ok(id)); }