void MyBind() { ID_L.Text = ID.ToString(); M_Blog_Msg msgMod = msgBll.SelReturnModel(ID); CUser_L.Text = "<a href='../User/UserInfo.aspx?ID=" + msgMod.CUser + "'>" + msgMod.CUName + "</a>"; MsgContent_L.Text = msgMod.MsgContent; MsgContent_T.Text = msgMod.MsgContent; CDate_L.Text = msgMod.CDate.ToString(); CDate_T.Text = msgMod.CDate.ToString(); EGV.DataSource = msgBll.Sel(ID); EGV.DataBind(); }
private void MyBind() { M_User_Plat upMod = B_User_Plat.GetLogin(); if (Mid > 0) { M_Common_Notify comMod = comBll.SelReturnModel(Mid); if (comMod.CUser != upMod.UserID) { function.WriteErrMsg("你无权修改该信息"); } MsgID = comMod.InfoID; Title_T.Text = comMod.Title; Content_T.Text = comMod.Content; BeginDate_T.Text = comMod.BeginDate.ToString("yyyy-MM-dd HH:mm:ss"); manage_hid.Value = buser.SelByIDS(comMod.ReceOrgin); function.Script(this, "SetRadVal('zstatus_rad'," + comMod.ZStatus + ");"); } else { msgMod = msgBll.SelReturnModel(MsgID); Title_T.Text = msgMod.Title; Content_T.Text = msgMod.MsgContent; BeginDate_T.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); manage_hid.Value = buser.SelByIDS(upMod.UserID.ToString()); } RPT.DataSource = comBll.Blog_Sel(MsgID, -100); RPT.DataBind(); }
//转发 protected void Froward_Btn_Click(object sender, EventArgs e) { int forid = Convert.ToInt32(Forward_ID_Hid.Value); M_Blog_Msg model = msgBll.SelReturnModel(forid); if (model.MsgType != 2) { msgMod = FillMsg(ForMsg_Text.Text); msgMod.ForWardID = forid; msgBll.Insert(msgMod); MyBind(); } else { function.Script(this, "alert('该类型不允许转发');"); } }
//转发 public IActionResult Blog_Forward() { int forid = Convert.ToInt32(GetParam("Forward_ID_Hid")); M_Blog_Msg model = msgBll.SelReturnModel(forid); if (model.MsgType != 2) { msgMod = FillMsg(GetParam("ForMsg_Text")); msgMod.ForWardID = forid; msgBll.Insert(msgMod); return(WriteOK("转发成功")); } else { return(WriteErr("该类型不允许转发")); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { M_User_Plat upMod = B_User_Plat.GetLogin(); int id = DataConvert.CLng(Request.QueryString["id"]); M_Blog_Msg msgMod = msgBll.SelReturnModel(id); Response.Write(msgMod.MsgContent); Response.Flush(); Response.End(); } }
private void MyBind() { if (Mid < 0) { Response.Redirect("/PItem?ID=" + (-Mid)); return; } M_Blog_Msg msgMod = msgBll.SelReturnModel(Mid); M_User_Plat user = B_User_Plat.GetLogin(); //if (user.CompID != msgModel.CompID){function.WriteErrMsg("此文章您没有权限访问!");} CDate_L.Text = msgMod.CDate.ToString("yyyy年MM月dd日 hh:mm"); Read_L.Text = "<span title='阅读量'> <i class='fa fa-eye'></i>" + msgMod.ReadNumber + "</span>"; Content_Lit.Text = msgMod.MsgContent; ids_Hid.Value = msgMod.LikeIDS; Attach_Lit.Text = GetAttach(msgMod.Attach); if (msgMod.MsgType == 2) { LoadVote(); } //--------------------------------- DataTable dt = null; int pageCount = 0; dt = likeBll.SelLikeUsers(Mid, "plat"); //Like_RPT.DataSource = dt; //Like_RPT.DataBind(); Empty_Span_Like.Visible = dt.Rows.Count <= 0; dt = msgBll.SelByPid(5, CPage, out pageCount, Mid); MsgRepeater.DataSource = dt; MsgRepeater.DataBind(); Empty_Span_Comm.Visible = dt.Rows.Count <= 0; commCount_L.Text = msgBll.GetSumCount(Mid).ToString(); UserInfo_Hid.Value = user.TrueName + ":" + user.UserFace; likeCount_L.Text = msgMod.LikeIDS.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).Length.ToString(); MsgPage_L.Text = PageCommon.CreatePageHtml(pageCount, CPage); }
public DataTable GetDTFromPlat() { B_Blog_Msg msgBll = new B_Blog_Msg(); M_Blog_Msg msgMod = msgBll.SelReturnModel(Sid); DataTable dt = DTFormat(); int index = 0; foreach (string file in msgMod.Attach.Split('|')) { if (SafeSC.IsImage(file)) { DataRow dr = dt.NewRow(); dr["Index"] = index; index++; dr["Src"] = file; dt.Rows.Add(dr); } } return(dt); }