コード例 #1
0
        public ActionResult Edit()
        {
            var Id     = Request.QueryString["PerformancePresentation_ht"];
            var result = omc.FindOne <PerformancePresentation>(a => a._id == ObjectId.Parse(Id));

            return(View(result));
        }
コード例 #2
0
        public ActionResult Edit()
        {
            var Id       = Request.QueryString["HomeText_ht"];
            var homrtext = omc.FindOne <HomeText>(a => a._id == ObjectId.Parse(Id));

            return(View(homrtext));
        }
コード例 #3
0
        public ActionResult Edit()
        {
            var Id     = Request.QueryString["PressCenter_id"];
            var result = omc.FindOne <PressCenter>(a => a._id == ObjectId.Parse(Id));

            ViewBag.EditorHtml = result.Content;
            return(View(result));
        }
コード例 #4
0
        public ActionResult Index()
        {
            CompanyProfile list = omc.FindOne <CompanyProfile>(a => a.Language == Language);

            if (list == null)
            {
                list = new CompanyProfile();
            }
            return(View(list));
        }
コード例 #5
0
        public string Loginlocal(UM userInfo)
        {
            string         re    = "";
            OhyMongoClient omc   = new OhyMongoClient();
            UM             users = omc.FindOne <UM>(a => a.UserName == userInfo.UserName && a.PassWord == userInfo.PassWord);

            if (users != null)
            {
                //Session["User"] = userInfo.UserName;
                HttpCookie user = new HttpCookie("User");
                user.Value = users._id.ToString();
                System.Web.HttpContext.Current.Response.SetCookie(user);
                re = "1";
            }
            return(re);
        }