Exemple #1
0
        public ActionResult Index(string tname, string searchdata, string startdt, string enddt, int?page, int tid = 1)
        {
            tname = "Engineering";
            Model.PageModel.PEModel model = new Model.PageModel.PEModel();
            model.username = this.UserNameContext.Substring(0, this.UserNameContext.Length - 17);
            if (tid == 0)
            {
                return(PartialView("IndexLogin", model));
            }
            ViewBag.PartialView = false;
            ViewBag.Index       = page ?? 1;
            ViewBag.PageSize    = 10;
            model.V_CMSCategory = Data.advt_CMSCategory.Get_advt_CMSCategory(tid);
            model.L_topics      = Data.advt_topics.Get_All_Advt_topic_id(ViewBag.PageSize, ViewBag.Index, tid, searchdata, startdt, enddt);
            var count = Data.advt_topics.Get_All_Advt_topic_id(0, 0, tid, searchdata, startdt, enddt);

            ViewBag.RecordCount  = count.Count;
            model.L_state        = BLL.PEBLL.Get_All_State();
            model.L_categoryname = BLL.PEBLL.Get_All_CategoryName();
            model.L_Bit          = BLL.PEBLL.Get_All_Bit();
            var a = Data.advt_users_type.Get_advt_users_type(this.advt_user.username);

            model.isAdministrators = false;
            model.tname            = tname;
            if (a != null)
            {
                if (a.type == "Administrators")
                {
                    model.isAdministrators = true;
                }
            }
            return(View(model));
        }
Exemple #2
0
 public ActionResult Classify(string tid)
 {
     Model.PageModel.PEModel model = new Model.PageModel.PEModel();
     model.username = this.UserNameContext;
     if (!string.IsNullOrEmpty(tid))
     {
         model.tname = tid;
         return(PartialView("IndexLogin", model));
     }
     return(View(model));
 }
Exemple #3
0
 public ActionResult User_type(string userid, int?page, string tname)
 {
     ViewBag.PartialView = false;
     ViewBag.Index       = page ?? 1;
     ViewBag.PageSize    = 10;
     Model.PageModel.PEModel model = new Model.PageModel.PEModel();
     model.username      = this.UserNameContext;
     model.L_usertype    = Data.advt_users_type.Get_advt_users_type_join_user(ViewBag.PageSize, ViewBag.Index, userid);
     ViewBag.RecordCount = Data.advt_users_type.Get_advt_users_type_join_user(0, 0, userid).Count;
     model.L_Location    = BLL.PEBLL.Get_All_Location();
     model.L_type        = BLL.PEBLL.Get_All_L_type();
     model.tname         = tname;
     return(View(model));
 }
Exemple #4
0
        public ActionResult AddData(advt_topics V_topics)
        {
            bool result = false;

            Model.PageModel.PEModel model = new Model.PageModel.PEModel();
            V_topics.createdt  = Convert.ToDateTime(DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day); //上传时间
            V_topics.username  = this.advt_user.username;                                                                   //分享人
            V_topics.available = (byte)Status.Normal.Enable;
            var info = Data.advt_topics.Insert_advt_topics(V_topics, null, new string[] { "id" });

            if (info == 1)
            {
                result = true;
            }
            return(Json(new { result = result, createdate = V_topics.createdt, username = V_topics.username, files = V_topics.attachment, item9 = V_topics.item9 }, JsonRequestBehavior.AllowGet));
        }