예제 #1
0
        public List <PopulerSearchesViewModel> CompanyJobVacancies()
        {
            DataTable dt = _homeRepositories.CompanyJobVacancies();
            List <PopulerSearchesViewModel> lstCompany = new List <PopulerSearchesViewModel>();

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    PopulerSearchesViewModel company = new PopulerSearchesViewModel
                    {
                        UserId      = Convert.ToInt32(dt.Rows[i]["UserId"]),
                        CompanyName = Convert.ToString(dt.Rows[i]["CompanyName"]),
                        TotalCount  = Convert.ToString(dt.Rows[i]["Count"]),
                    };
                    lstCompany.Add(company);
                }
            }
            return(lstCompany);
        }