public string CheckAdd(int userID,string title, string content, byte isNiming, byte chenmo) { if (title.Trim() == "") return "标题不能为空"; if (content == "") return "内容不能为空"; bizUserXCard b=new bizUserXCard(); List<UserXCard> listCard = b.ListByUser(userID); int nimingCard=0; int bigNimingCard = 0; int chenmoCard = 0; nimingCard = b.GetCardNum(listCard, "niming"); bigNimingCard = b.GetCardNum(listCard, "bigniming"); chenmoCard = b.GetCardNum(listCard, "chenmo"); if (isNiming == 1) { if (nimingCard == 0) return "你没有匿名卡"; } if (isNiming == 2) { if (bigNimingCard == 0) return "你没有超级匿名卡"; } if (chenmo == 1) { if (chenmoCard == 0) return "你没有沉默卡"; } return ""; }
public string CheckAdd(int userID, string content, byte isNiming) { if (content == "") return "内容不能为空"; bizUserXCard b = new bizUserXCard(); List<UserXCard> listCard = b.ListByUser(userID); int nimingCard = 0; int bigNimingCard = 0; nimingCard = b.GetCardNum(listCard, "niming"); bigNimingCard = b.GetCardNum(listCard, "bigniming"); if (isNiming == 1) { if (nimingCard == 0) return "你没有匿名卡"; } if (isNiming == 2) { if (bigNimingCard == 0) return "你没有超级匿名卡"; } return ""; }
public static int GetHammerCount(int userid) { bizUserXCard biz = new bizUserXCard(); return biz.GetCardNum(userid, SZXX.Common.Enumerations.CardType.zadanchui.ToString()); }
public ActionResult UserJiQiqiu(int id) { bizBBSMain bm = new bizBBSMain(); bizUserSkill bus = new bizUserSkill(); BBSMain model = bm.Get(id); List<Card> listCard = BBSCache.Instance().ListCard(); bizUserXCard buc = new bizUserXCard(); UserSkill modelSkill = bus.Get(1); ViewData["ModelSkill"] = modelSkill; ViewData["CardList"] = listCard; ViewData["qiqiuNum"] = buc.GetCardNum(UserID, Enumerations.CardType.qiqiu.ToString()); ViewData["bigqiqiuNum"] = buc.GetCardNum(UserID, Enumerations.CardType.bigqiqiu.ToString()); return View(model); }
public ActionResult Post(int typeMain, int typeDe) { int userID = UserID; bizUserXCard uc = new bizUserXCard(); bizBBSTypes b = new bizBBSTypes(); bizUsers bu = new bizUsers(); Users modelUser = bu.Get(UserID); List<BBSTypes> listType; if ((AdminType & 4)== 4) listType = BBSCache.Instance().ListBBSTypeForAdmin(typeMain); else listType = BBSCache.Instance().ListBBSType(typeMain); ViewData["typeMain"] = typeMain; ViewData["typeDe"] = typeDe; ViewData["ListType"] = listType; ViewData["Niming"] = uc.GetCardNum(userID, "niming"); ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming"); ViewData["Chenmo"] = uc.GetCardNum(userID, "chenmo"); ViewData["toupiao"] = uc.GetCardNum(userID, "toupiao"); ViewData["ShowSelfQM"] = ShowSelfQM; if ((new bizUserForbid()).GetByUserID(UserID) != null) { TempData["Msg"] = "�����ڽ����ڼ䣬��������"; return View(); } if (modelUser.Score - modelUser.UsedScore < 0) { TempData["Msg"] = "��Ļ���Ϊ���֣���ʱ��������"; return View(); } if (TempData["Title"]==null) TempData["Title"] = ""; if (TempData["Content"] == null) TempData["Content"] = ""; return View(); }
public ActionResult Content(int id,int page) { int userID = UserID; bizBBSMain b = new bizBBSMain(); bizBBSDE bde = new bizBBSDE(); bizUserXCard uc = new bizUserXCard(); BBSMainRelationQuery model = b.GetBBSMainDetail(id); if(model==null) return Redirect("/bbs/NoPage.html"); if (UserCommon.CheckBBSAdminRight(AdminType) == false && model.DeleteType != 0) return Redirect("/bbs/NoPage.html"); List<BBSTypes> listBBSType = (new bizBBSTypes()).ListByMainID(1); b.AddHit(id); int count; List<BBSDERelationQuery> list = bde.List(id, page-1, 50, out count); ViewData["List"] = list; ViewData["PageList"] = bbs.GetBBSContentPageList(id, count, page); ViewData["Page"] = page; ViewData["deID"] = 0; ViewData["ID"] = id; ViewData["AdminType"] = AdminType; ViewData["ShowAllQM"] = ShowAllQM; ViewData["ShowSelfQM"] = ShowSelfQM; ViewData["TypesName"] = SZXX.UI.Public.CommonHelper.GetBBSTypeName(listBBSType, model.TypeDeID); if (userID != 0) { ViewData["Niming"] = uc.GetCardNum(userID, "niming"); ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming"); } bizPopUp bp = new bizPopUp(); DataSet pmodel = bp.GetNew(userID); if (pmodel != null) { //if (pmodel.Tables[0].Rows[0][2].ToString() == "1") //��ʾΪϵͳ��Ϣ //{ // if (SZXX.UI.Public.PublicHelper.GetCookie("PopInfoID") != pmodel.Tables[0].Rows[0][0].ToString()) // { // ViewData["PopUp"] = pmodel; // SZXX.UI.Public.PublicHelper.WriteCookie("PopInfoID", pmodel.Tables[0].Rows[0][0].ToString()); // } // else // ViewData["PopUp"] = null; //} //else if (ShowPopup) ViewData["PopUp"] = pmodel; else ViewData["PopUp"] = null; } return View(model); }
public ActionResult ReplayDe(int id, int deID) { int userID = UserID; bizBBSMain b = new bizBBSMain(); bizUserXCard uc = new bizUserXCard(); BBSMain model=b.Get(id); if(model==null) Response.Redirect("/bbs/1/0/Main.html"); if (model.ChenmoType == 2) { TempData["Msg"] = "����������Ա��Ĭ"; return Redirect("/bbs/"+id+".html"); } if (model.ChenmoType == 1 && model.AddUser != userID) { TempData["Msg"] = "������¥����Ĭ"; return Redirect("/bbs/" + id + ".html"); } ViewData["Title"] = "<a target='_blank' href='/bbs/"+ model.BBSMainID +".html'>"+model.Title+"</a>"; ViewData["Niming"] = uc.GetCardNum(userID, "niming"); ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming"); ViewData["deID"] = deID; ViewData["ID"] = id; ViewData["ShowSelfQM"] = ShowSelfQM; return View("Replay"); }