public static CompanyCostTypeService GetInstance()
 {
     if (instance == null)
     {
         instance = new CompanyCostTypeService();
     }
     return(instance);
 }
        public void PopulateSelectLists(CompanyViewModelDD companyViewModelDD)
        {
            var CompanyTypeSelectList = CompanyTypeService.GetAll().Select(companyType => new SelectListItem
            {
                Text     = companyType.CompanyTypeName,
                Value    = companyType.ID.ToString(),
                Selected = companyType.ID == companyViewModelDD.CompanyCostTypeID
            });

            var CompanyCostTypeSelectList = CompanyCostTypeService.GetAll().Select(companyCostType => new SelectListItem
            {
                Text     = companyCostType.CostType,
                Value    = companyCostType.ID.ToString(),
                Selected = companyCostType.ID == companyViewModelDD.CompanyCostTypeID
            });

            companyViewModelDD.CompanyTypes     = CompanyTypeSelectList;
            companyViewModelDD.CompanyCostTypes = CompanyCostTypeSelectList;
        }
        private CompanyService()
        {
            container = new List <Company>()
            {
                new Company()
                {
                    ID   = 1,
                    Name = "Fragola",
                    CompanyCostTypeID = 2,
                    CompanyTypeID     = 1,
                    Logo             = null,
                    RegistrationDate = new DateTime(2016, 01, 15),

                    CompanyCostType = CompanyCostTypeService.FindByID(2),
                    CompanyType     = CompanyTypeService.FindByID(1),

                    Products = ProductService.GetProductsByCompanyID(1).ToList(),
                    Raitings = RaitingService.GetRaitingsByCompanyID(1).ToList(),
                },

                new Company()
                {
                    ID   = 2,
                    Name = "თაღლაურა",
                    CompanyCostTypeID = 2,
                    CompanyTypeID     = 1,
                    Logo             = null,
                    RegistrationDate = new DateTime(2016, 01, 15),

                    CompanyCostType = CompanyCostTypeService.FindByID(2),
                    CompanyType     = CompanyTypeService.FindByID(1),

                    Products = ProductService.GetProductsByCompanyID(1).ToList(),
                    Raitings = RaitingService.GetRaitingsByCompanyID(2).ToList(),
                },
            };
        }