예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public async Task <IActionResult> Save([FromBody] ECompany eCompany)
        {
            string id = await SCompanies.Save(eCompany);

            return(Ok(id));
        }