private void dBind()
        {
            int       GID   = DataConverter.CLng(this.HdnGID.Value);
            DataTable dt    = GetReply(GID);
            int       Total = B_GuestBook.GetTipsTotal(GID);

            this.Repeater1.DataSource = dt;
            this.Repeater1.DataBind();
        }
Exemplo n.º 2
0
        public PartialViewResult GuestShow_Data()
        {
            int         GID     = DataConverter.CLng(RequestEx["GID"]);
            PageSetting setting = B_GuestBook.SelPage(CPage, 20, new F_Guest()
            {
                gid = GID
            });

            return(PartialView(setting));
        }
 protected void repFileReName_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     switch (e.CommandName)
     {
     case "Del":
         string Id = e.CommandArgument.ToString();
         B_GuestBook.DelTips(DataConverter.CLng(Id));
         dBind();
         break;
     }
 }
 //删除等操作
 protected void Lnk_Click(object sender, GridViewCommandEventArgs e)
 {
     if (this.Page.IsValid)
     {
         if (e.CommandName == "Del")
         {
             string Id = e.CommandArgument.ToString();
             B_GuestBook.DelTips(DataConverter.CLng(Id));
             DataBind();
         }
     }
 }
 protected void btndelete_Click(object sender, EventArgs e)
 {
     string[] chkArr = GetChecked();
     if (chkArr != null)
     {
         for (int i = 0; i < chkArr.Length; i++)
         {
             int itemID = Convert.ToInt32(chkArr[i]);
             B_GuestBook.DelTips(itemID);
         }
     }
     DataBind();
 }
Exemplo n.º 6
0
 //回复加积分操作
 private void AddUserExp(M_UserInfo mu, int cateid, string title)
 {
     if (mu.UserID != 0)//是否匿名
     {
         M_GuestBookCate catemod = new B_GuestBook().SelReturnModel(cateid);
         buser.ChangeVirtualMoney(mu.UserID, new M_UserExpHis()
         {
             score     = catemod.ReplyScore,
             detail    = string.Format("{0} {1}在版面:{2}回复主题:{3},赠送{4}分", DateTime.Now, mu.UserName, catemod.CateName, title, catemod.ReplyScore),
             ScoreType = (int)M_UserExpHis.SType.Point
         });
     }
 }
Exemplo n.º 7
0
        public PartialViewResult Cate_Data()
        {
            int         CateID  = DataConverter.CLng(RequestEx["cateid"]);
            PageSetting setting = B_GuestBook.SelPage(CPage, PSize, new F_Guest()
            {
                parentId  = 0,
                skey      = RequestEx["skey"],
                cateIds   = CateID.ToString(),
                uids      = mu.UserID.ToString(),
                onlyAudit = true
            });

            return(PartialView("Default_List", setting));
        }
 protected void btndelete_Click(object sender, EventArgs e)
 {
     string[] chkArr = GetChecked();
     if (chkArr != null)
     {
         for (int i = 0; i < chkArr.Length; i++)
         {
             int itemID = Convert.ToInt32(chkArr[i]);
             B_GuestBook.DelTips(itemID);
         }
     }
     DataBind();
     Page.ClientScript.RegisterStartupScript(this.GetType(), "wt", "location=location;", true);
 }
Exemplo n.º 9
0
        public IActionResult MsgList()
        {
            ViewBag.viewDir = viewDir;
            int         Status  = DataConvert.CLng(GetParam("status"), 0);
            PageSetting setting = B_GuestBook.SelPage(CPage, PSize, new F_Guest()
            {
                status  = Status,
                skey    = GetParam("skey"),
                cateIds = CateID.ToString()
            });

            if (Request.IsAjax())
            {
                return(PartialView("Msg_List", setting));
            }
            return(View("MsgList", setting));
        }
Exemplo n.º 10
0
        protected void Lnk_Click(object sender, GridViewCommandEventArgs e)
        {
            if (this.Page.IsValid)
            {
                switch (e.CommandName)
                {
                case "QList":
                    Response.Redirect("GuestBookShow.aspx?GID=" + e.CommandArgument.ToString());
                    break;

                case "Reply":
                    Response.Redirect("ReplyGuest.aspx?GID=" + e.CommandArgument.ToString());
                    break;

                case "RList":
                    Response.Redirect("ReplyList.aspx?GID=" + e.CommandArgument.ToString());
                    break;

                case "Del":
                    B_GuestBook.UpdateAudit(e.CommandArgument.ToString(), -1);
                    break;

                case "Del2":
                    int gid = DataConverter.CLng(e.CommandArgument);
                    B_GuestBook.DelByIDS(e.CommandArgument.ToString());
                    break;

                case "Audit":
                    B_GuestBook.UpdateAudit(e.CommandArgument.ToString(), 1);
                    break;

                case "CancelAudit":
                    B_GuestBook.UpdateAudit(e.CommandArgument.ToString(), 0);
                    break;
                }
                MyBind();
            }
        }
 protected void Lnk_Click(object sender, GridViewCommandEventArgs e)
 {
     if (this.Page.IsValid)
     {
         if (e.CommandName == "Del")
         {
             string Id = e.CommandArgument.ToString();
             B_GuestBook.DelTips(DataConverter.CLng(Id));
             DataBind();
         }
         if (e.CommandName == "QList")
         {
             Response.Redirect("GuestBookShow.aspx?GID=" + e.CommandArgument.ToString());
         }
         if (e.CommandName == "Reply")
         {
             Response.Redirect("ReplyGuest.aspx?GID=" + e.CommandArgument.ToString());
         }
         if (e.CommandName == "RList")
         {
             Response.Redirect("ReplyList.aspx?GID=" + e.CommandArgument.ToString());
         }
     }
 }
Exemplo n.º 12
0
    public void MyBind()
    {
        int        pageCount = 0;
        DataTable  dt        = new DataTable();
        M_UserInfo mu        = tpuser_Bll.GetLogin(); //barBll.GetUser();

        if (!string.IsNullOrEmpty(Request.QueryString["searchstr"]) || !string.IsNullOrEmpty(Request.QueryString["uid"]) || !string.IsNullOrEmpty(Request.QueryString["islike"]))
        {
            string skey    = Request.QueryString["searchstr"];
            int    uid     = DataConvert.CLng(Request.QueryString["uid"]);
            bool   sellike = DataConvert.CLng(Request.QueryString["islike"]) > 0 ? true : false;
            string skeyTlp = "\"<span style='color:#ff6a00;'>{0}</span>\"";

            if (!string.IsNullOrEmpty(skey))
            {
                BarName_L.Text = "相关" + string.Format(skeyTlp, skey) + "的贴子";
                Title_L.Text   = skey + "\"的贴子";
                dt             = barBll.SelByCateID(skey, 3);
            }
            else if (sellike)
            {
                BarName_L.Text = string.Format(skeyTlp, "我的收藏");
                Title_L.Text   = "我的收藏";
                dt             = barBll.SelByCateID(mu.UserID.ToString(), 4);
            }
            else
            {
                M_UserInfo smu = new M_UserInfo();
                if (uid < 1)//匿名用户不允许搜索
                {
                    smu.UserName = "******";
                }
                else
                {
                    smu = buser.GetUserByUserID(uid);
                    dt  = barBll.SelByCateID(uid.ToString(), 2);
                }
                BarName_L.Text = string.Format(skeyTlp, smu.HoneyName) + "的贴子";
                Title_L.Text   = smu.HoneyName + "的贴子";
            }
            Cid = cateMod.CateID;
            totalspan.InnerText = "共搜索到" + dt.Rows.Count + "个贴子";
            function.Script(this, "SetImg('/App_Themes/User/timg.jpg');");
            IsSearch             = true;
            MsgTitle_T.Enabled   = false;
            MsgContent_T.Enabled = false;
            SendDiv.Visible      = false;
        }
        else
        {
            Cid     = cateMod.CateID;
            dt      = barBll.SelByCateID(CateID.ToString(), 1, true);
            cateMod = guestBll.GetCate(CateID);

            #region 权限校验
            if (cateMod.IsBarOwner(mu.UserID))
            {
                barowner_div.Visible = true;
                IsBarOwner           = true;
                DPBind();
            }
            else//非吧主权限验证
            {
                switch (cateMod.PermiBit)
                {
                case "1":    //版面类别
                    emptydiv.Style.Add("display", "none");
                    send_div.Visible = false;
                    RPT.Visible      = false;
                    break;

                default:
                    if (!authBll.AuthCheck(cateMod, mu, "needlog"))    //访问权限
                    {
                        function.WriteErrMsg("你没有访问权限");
                    }
                    if (!authBll.AuthCheck(cateMod, mu, "send"))    //发贴权限
                    {
                        send_div.Visible   = false;
                        noauth_div.Visible = true;
                    }
                    break;
                }
            }
            #endregion
            BarInfo_L.Text = cateMod.Desc;
            function.Script(this, "SetImg('" + cateMod.BarImage + "');");
            if (cateMod.IsNull)
            {
                function.WriteErrMsg("该贴吧不存在!!");
            }
            Title_L.Text   = cateMod.CateName;
            BarName_L.Text = cateMod.CateName;
            DataTable chdt = B_GuestBook.GetCateList(CateID);
            if (chdt.Rows.Count > 0)
            {
                ChildRPT.DataSource = chdt;
                ChildRPT.DataBind();
            }
            else
            {
                childBar.Visible = false;
            }
        }
        RPT.DataSource = PageCommon.GetPageDT(pageSize, CPage, dt, out pageCount);
        RPT.DataBind();
        int tiecount = 0;
        int recout   = 0;
        barBll.GetCount(CateID, out tiecount, out recout);
        replycount.InnerText    = recout.ToString();
        dnum_span.InnerText     = dt.Rows.Count.ToString();
        dnum_span2.InnerText    = tiecount.ToString();
        pagenum_span1.InnerText = pageCount.ToString();
        MsgPage_L.Text          = PageCommon.CreatePageHtml(pageCount, CPage);
        if (dt.Rows.Count > 0)
        {
            contentdiv.Visible = true;
        }
        else
        {
            emptydiv.Visible = true;
        }
        Anony_Span.Visible = mu.UserID <= 0;
    }
Exemplo n.º 13
0
 protected void Del_B_Click(object sender, EventArgs e)
 {
     B_GuestBook.DelByIDS(Request.Form["idchk"]);
     this.MyBind();
 }