Esempio n. 1
0
        public ActionResult TempArticleDetails(int id)
        {
            HttpCookie cookie          = Request.Cookies["Employer"];
            string     EmployerAccount = cookie.Values["EmployerAccount"];

            ViewBag.tb_Article = TempArticle.GetTempArticleByTempArticleID(id, EmployerAccount);
            ViewBag.tb_Demand  = TempDemandInfo.GetTempDemandInfoByTempArticleID(id);
            return(View());
        }
Esempio n. 2
0
        public ActionResult TempArticleEdit(int id) //此处id表示TempArticleID
        {
            ViewBag.flag = true;                    //文章是否存在的标志

            HttpCookie cookie = Request.Cookies["Employer"];

            if (cookie != null)
            {
                string    EmployerAccount = cookie.Values["EmployerAccount"];
                DataTable temparticle     = TempArticle.GetTempArticleByTempArticleID(id, EmployerAccount);//得到临时表文章
                if (temparticle != null && temparticle.Rows.Count > 0)
                {
                    ViewBag.Article = temparticle;

                    //显示大型招聘会选项
                    int typeid = Convert.ToInt32(temparticle.Rows[0]["TypeID"]);
                    ViewBag.typename = ArticleType.GetTypeNameByTypeID(typeid);

                    if (typeid == 1)//专场招聘
                    {
                        ViewBag.PlaceListFirst = Article.GetPlaceListFirst();
                    }
                    else if (typeid == 2)//双选会
                    {
                        DataTable bigarticleTable2 = Article.SelectArticleFromArticle(2, DateTime.Now);
                        ViewBag.bigarticleTable2 = bigarticleTable2;
                    }
                    else if (typeid == 3)//组团招聘
                    {
                        DataTable bigarticleTable3 = Article.SelectArticleFromArticle(3, DateTime.Now);
                        ViewBag.bigarticleTable3 = bigarticleTable3;
                    }
                    //其他类型的文章不用管

                    //需求部分
                    ViewBag.DemandInfos = TempDemandInfo.GetTempDemandInfoByTempArticleID(id);
                }
                else
                {
                    ViewBag.flag = false;
                }                             //文章不存在
            }
            else
            {
                ViewBag.flag = false;
            }                            //cookie不存在

            return(View());
        }