Exemple #1
0
        public void MoveFromBlackList(Guid badEntityID)
        {
            if (BlackLists.Where(bl => bl.BlackListID == badEntityID).SingleOrDefault() == null)
            {
                return;
            }

            BlackLists.DeleteOnSubmit(BlackLists.Where(bl => bl.BlackListID == badEntityID).SingleOrDefault());

            SubmitChanges();
        }
Exemple #2
0
        public void MoveToBlackList(Guid badEntityID, string reason)
        {
            if (BlackLists.Where(bl => bl.BlackListID == badEntityID).SingleOrDefault() != null)
            {
                return;
            }

            BlackLists.InsertOnSubmit(new BlackList {
                BlackListID = badEntityID, Date = DateTime.Now, Description = reason
            });

            SubmitChanges();
        }
Exemple #3
0
        public ActionResult BlackList(string page)
        {
            ViewData["AdditionHeader"] = "我的设置";
            int pageIndex = 1;

            if (!string.IsNullOrEmpty(page))
            {
                pageIndex = Convert.ToInt32(page);
            }
            BlackListModel model = new BlackListModel();

            model.CurUser       = CurrentUser;
            model.CurUserConfig = CurrentUserConfig;
            int recordCount = 0;

            model.BlackLists  = BlackLists.GetMyBlackList(pageIndex, 10, model.CurUser.ID, ref recordCount);
            model.RecordCount = recordCount;
            model.PageIndex   = pageIndex;
            model.PageSize    = 10;
            return(View(model));
        }