/// <summary> /// 添加推送置顶图片 /// </summary> /// <param name="contentId">内容编号</param> /// <param name="photoPath">图片路径</param> /// <returns>操作状态</returns> public static CBB.ExceptionHelper.OperationResult AddPushImage(String contentId, String photoPath) { Content.ImageContent imagecontent = new Content.ImageContent(contentId); TopImagePush.ImagePushCount pushcount = new BiZ.TopImagePush.ImagePushCount(); List<Content.Image> listImage = new List<Content.Image>(); Content.Image image = new Content.Image(photoPath); listImage.Add(image); BiZ.TopImagePush.ImagePush imagepush = new BiZ.TopImagePush.ImagePush( contentId, imagecontent.MemberID, listImage, imagecontent.Content, pushcount, DateTime.Now, Comm.DeletedFlag.Yes); imagepush.Save(imagepush); return new CBB.ExceptionHelper.OperationResult(true); }
public ActionResult UpdatePushShowCount(string id) { if (id == null || id == "") return RedirectToAction("Error", "Error", new { errNo = "参数不正确。" }); BiZ.TopImagePush.ImagePush imagePush = new BiZ.TopImagePush.ImagePush(id); BiZ.TopImagePush.ImagePushCount imagePushCount = new BiZ.TopImagePush.ImagePushCount(imagePush.ImagePushCount.ShowCount + 1, imagePush.ImagePushCount.ClickCount); imagePush.ImagePushCount = imagePushCount; imagePush.Save(imagePush); return Json(new JavaScriptSerializer().Serialize(true)); }
public ActionResult AddTopImagePush(string contentid) { BiZ.Content.ImageContent imagecontent=new BiZ.Content.ImageContent(contentid); BiZ.TopImagePush.ImagePushCount pushcount = new BiZ.TopImagePush.ImagePushCount(); BiZ.TopImagePush.ImagePush imagepush = new BiZ.TopImagePush.ImagePush( contentid, imagecontent.MemberID, imagecontent.ImageList, imagecontent.Content, pushcount, DateTime.Now, BiZ.Comm.DeletedFlag.No); imagepush.Save(imagepush); return Json(new JavaScriptSerializer().Serialize(true)); }