// uloží nový záznam
        public string SaveCompany(CompanyEntity newCompany)
        {
            VERSION_COMPANY companyToDB = new VERSION_COMPANY();

            companyToDB.VER_COMPANY           = newCompany.Name;
            companyToDB.VER_COMPANY_ACTIVE    = newCompany.Active;
            companyToDB.VER_COMPANY_DESC      = newCompany.Description;
            companyToDB.VER_COMPANY_INTERFACE = newCompany.Interface;
            companyToDB.VER_COMPANY_TYPE      = newCompany.Type;
            companyToDB.VER_COMPANY_LANGUAGE  = newCompany.Language;

            return(dbRepository.AddCompany(companyToDB));
        }
        // aktualizuje záznam
        public string ChangeCompany(CompanyEntity companyForChange)
        {
            VERSION_COMPANY companyForChangeDB = new VERSION_COMPANY();

            companyForChangeDB.VER_COMPANY_ID        = companyForChange.Id;
            companyForChangeDB.VER_COMPANY           = companyForChange.Name;
            companyForChangeDB.VER_COMPANY_ACTIVE    = companyForChange.Active;
            companyForChangeDB.VER_COMPANY_DESC      = companyForChange.Description;
            companyForChangeDB.VER_COMPANY_INTERFACE = companyForChange.Interface;
            companyForChangeDB.VER_COMPANY_TYPE      = companyForChange.Type;
            companyForChangeDB.VER_COMPANY_LANGUAGE  = companyForChange.Language;

            return(dbRepository.ChangeCompany(companyForChangeDB));
        }
        // vrátí vybraný záznam pro potvrzení vymazání
        public void GetCompanyForDeletionAndUpdate(int companyId)
        {
            VERSION_COMPANY companyFromDB = dbRepository.GetCompanyForDeletion(companyId);

            CompanyEntity.Actives = new List <System.Web.Mvc.SelectListItem>();

            CompanyEntity = new CompanyEntity(HelpsMethods.GetIntFromDecimal(companyFromDB.VER_COMPANY_ID),
                                              companyFromDB.VER_COMPANY,
                                              companyFromDB.VER_COMPANY_ACTIVE,
                                              companyFromDB.VER_COMPANY_DESC,
                                              companyFromDB.VER_COMPANY_INTERFACE,
                                              companyFromDB.VER_COMPANY_TYPE,
                                              companyFromDB.VER_COMPANY_LANGUAGE,
                                              "not used"
                                              );
        }