Example #1
0
        public ActionResult CreateIntime(int prodid)
        {
            Inpinke_Product intime = DBProductBLL.GetProductByID(prodid);
            Inpinke_Book    model  = new Inpinke_Book()
            {
                UserID     = UserSession.CurrentUser.ID,
                BookName   = "我的时光",
                Author     = UserSession.CurrentUser.NickName,
                BookDesc   = "那些过往的时光,穿行在我的字里行间。无声的行走。无休。",
                PageCount  = intime.BasePages,
                ProductID  = prodid,
                ShowStatus = (int)ShowStatus.Public,
                BookCover  = "/Content/pagestyle/images/intime_cover.png"
            };
            BaseResponse br = DBBookBLL.AddBook(model);

            if (br.IsSuccess)
            {
                return(RedirectToAction("editor", new { bookid = model.ID }));
            }
            else
            {
                ViewBag.Msg = "对不起,定制印品失败,您可以重新登录再尝试下。";
                return(View("error"));
            }
        }