Ejemplo n.º 1
0
        public ActionResult JobDetail(int id, int JobID)
        {
            svJob     = new JobService();
            svCompany = new CompanyService();
            svArticle = new ArticleService();

            string page = "Jobs";

            DefaultWebsite(id, page);

            string sqlWhere = "JobID = " + JobID + " AND IsDelete = 0";
            var    emJobs   = svJob.SelectData <view_emJob>("*", sqlWhere).First();

            ViewBag.emJobs = emJobs;

            string sqlSelect = "ArticleID, ArticleName ,CompID";

            sqlWhere = "CompID =" + id + " AND IsDelete = 0";
            var emArticles = svArticle.SelectData <b2bArticle>(sqlSelect, sqlWhere);

            ViewBag.emArticles = emArticles;

            GetStatusUser();
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult Jobs(int id)
        {
            if (RedirectToProduction())
            {
                return(Redirect(UrlProduction));
            }

            string page         = "Jobs";
            int    countcompany = DefaultWebsite(id, page);

            if (countcompany > 0)
            {
                if (ViewBag.CountJob > 0)
                {
                    svJob = new JobService();

                    SelectCompanyContactInfo(id, null);

                    string sqlSelect = "JobID, JobName, JobDescription,CompID, CompName, CompWebsiteUrl, ProvinceName, ModifiedDate, IsDelete";
                    string sqlWhere  = "CompID =" + ViewBag.WebEmCompID + " AND IsDelete = 0";
                    var    emJobs    = svJob.SelectData <view_emJob>(sqlSelect, sqlWhere);
                    ViewBag.emJobs = emJobs;

                    GetStatusUser();
                    return(View());
                }
                else
                {
                    GetStatusUser();
                    LinkPathCompanyWebsite((string)ViewBag.WebCompName, id);
                    return(Redirect(PathWebsiteHome));
                }
            }
            else
            {
                return(Redirect(res.Pageviews.PvNotFound));
            }
        }