Пример #1
0
        public string GetCompanyImage(Client client, BusinessStream businessStream)
        {
            var companyImage = _companyImageRepository.Find(x => x.ClientId == client.Id).FirstOrDefault();

            if (companyImage != null)
            {
                CompanyImageUrl = companyImage.ImagePath;
            }
            else
            {
                CompanyImageUrl = businessStream.CategoryImageUrl;
            }
            return(CompanyImageUrl);
        }
Пример #2
0
        public async Task <DomainModel.Models.BusinessStream> CreateBusinessStream(DomainModel.Models.BusinessStream businessStream)
        {
            if (businessStream.Id == null)
            {
                var bs = new BusinessStream
                {
                    BusinessStreamName = businessStream.BusinessStreamName
                };

                context.BusinessStream.Add(bs);
                await context.SaveChangesAsync();

                businessStream.Id = bs.Id;
            }

            return(businessStream);
        }
Пример #3
0
        public JobDetailsViewModel(Job job, Client client, BusinessStream businessStream, PostalCode postalCode)
        {
            if (client != null && job != null)
            {
                JobID    = job.Id;
                JobTitle = job.JobTitle.Trim().Replace("\n", "");
                PostDate = job.PostDate.ToString("yyyy-M-dd");
                var days = (DateTime.Now - job.PostDate).TotalDays;
                CompanyName       = client.CompanyName ?? "";
                WorkingHours      = job.Workinghour;
                Salary_Hourly     = job.Salary_Hourly;
                Salary_Monthly    = job.Salary_Monthly;
                ProvinceName      = postalCode.Province.Name_Jp;
                JapaneseLevel     = job.JapaneseLevel_Text;
                TransportationFee = job.Transporationfee;
                WebsiteUrl        = client.WebsiteUrl;
                ContractType      = job.ContractType_Text;
                CityName          = postalCode.CityName;
                WorkingAddress    = job.WorkLocationAddress;
                Town        = postalCode.Town;
                WorkingTime = job.WorkingTime;
                //RequiredAge = job.RequiredAge;
                MinAge        = job.MinAge;
                MaxAge        = job.MaxAge;
                StartWorkTime = job.StartWorkingTime;
                EndWorkTime   = job.EndWorkingTime;
                //var companyImage = _companyImageRepository.Find(x => x.ClientId == client.Id).FirstOrDefault();
                //if (companyImage != null)
                //{
                //    CompanyImageUrl = companyImage.ImagePath;
                //}
                //else
                //{
                //    CompanyImageUrl = businessStream.CategoryImageUrl;
                //}
                Town_En     = postalCode.Town_En;
                CityName_En = postalCode.CityName_En;

                if (businessStream != null)
                {
                    IndustryName = businessStream.Name;
                }
            }
        }
Пример #4
0
        public JobDetailsViewModel(Job job, Client client, BusinessStream businessStream)
        {
            JobID        = job.Id;
            JobTitle     = job.JobTitle;
            CompanyEmail = client.ContactEmail;
            var days = (DateTime.Now - job.PostDate).TotalDays;

            PostedDays        = String.Format("{0:0}", days);
            CompanyName       = client.CompanyName;
            WorkingHours      = job.Workinghour;
            WorkingDays       = job.WorkinghourPerday;
            Salary            = job.Salary;
            ProvinceName      = job.provinceName;
            JapaneseLevel     = job.JapaneseLevel;
            TransportationFee = job.Transporationfee;
            WebsiteUrl        = client.WebsiteUrl;
            ContractType      = job.ContractType;
            IndustryName      = businessStream.Name;
        }
Пример #5
0
 public async Task <BusinessStream> CreateBusinessStream([FromBody] BusinessStream businessStream) => await companyRepository.CreateBusinessStream(businessStream);
Пример #6
0
 public IEnumerable <Job> GetJobsByBusinessStream(BusinessStream businessstream, int age, string prefrecture)
 {
     return(_context.jobs.Include(x => x.BusinessStream)
            .Where(x => x.BusinessStream == businessstream));
 }