protected void Page_Load(object sender, EventArgs e) { ViewState["MsgID"] = Request.QueryString["id"].ToString(); if (!Page.IsPostBack) { this.LblSiteName.Text = SiteConfig.SiteInfo.SiteName; M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(ViewState["MsgID"].ToString())); this.LblSender.Text = messInfo.Sender.ToString(); this.LblIncept.Text = messInfo.Incept.ToString(); this.LblSendTime.Text = messInfo.PostDate.ToString(); this.LblTitle.Text = messInfo.Title; this.LblContent.Text = messInfo.Content; } }
protected void Page_Load(object sender, EventArgs e) { M_UserInfo info = buser.GetLogin(); if (info.IsNull) { Response.Redirect("Login.aspx"); } //if (!B_UserPurview.SelReturnByIDs(buser.GetLogin().UserRole, "OAEmailRead")) //{ // function.WriteErrMsg("对不起,您所在角色组没有使用权限"); //} ViewState["MsgID"] = Request.QueryString["id"].ToString(); if (!Page.IsPostBack) { M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(ViewState["MsgID"].ToString())); if (!bll.AllowRead(messInfo.MsgID, info.UserID.ToString()))//如无读该条信息的权限 { function.WriteErrMsg("无权限阅读该条信息!!!"); } this.LblSender.Text = buser.GetUserNameByIDS(messInfo.Sender.ToString()); string userNames = buser.GetUserNameByIDS(messInfo.Incept.ToString()); this.LblIncept.Text = userNames.Length > 100 ? userNames.Substring(0, 100) + "..." : userNames; this.LblSendTime.Text = messInfo.PostDate.ToString("yyyy年MM月dd日 HH:mm"); this.LblTitle.Text = messInfo.Title; this.txt_Content.Text = messInfo.Content; if (!string.IsNullOrEmpty(messInfo.Attachment)) { GetFile(messInfo.Attachment); } if (!string.IsNullOrEmpty(Request.QueryString["read"])) { string ccuser = "******" + info.UserID + ","; if (messInfo.CCUser.IndexOf(ccuser) > -1) { BtnReply.Visible = false; LBCopy.Visible = true; } if (messInfo.ReadUser.IndexOf("," + info.UserID + ",") == -1) { messInfo.ReadUser += info.UserID.ToString(); messInfo.status = 1; B_Message.Update(messInfo); } } } }
protected void Page_Load(object sender, EventArgs e) { buser.CheckIsLogin(); this.LblSiteName.Text = SiteConfig.SiteInfo.SiteName; if (!Page.IsPostBack) { if (!string.IsNullOrEmpty(base.Request.QueryString["id"])) { M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(base.Request.QueryString["id"])); if (!messInfo.IsNull) { this.TxtInceptUser.Text = messInfo.Sender; this.TxtTitle.Text = "回复:" + messInfo.Title; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!B_ARoleAuth.Check(ZLEnum.Auth.user, "MessManage")) { function.WriteErrMsg("没有权限进行此项操作"); } M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(Request.QueryString["id"])); LblSender.Text = messInfo.Sender.ToString(); LblIncept.Text = messInfo.Incept.ToString(); LblSendTime.Text = messInfo.PostDate.ToString(); LblTitle.Text = messInfo.Title; txt_Content.Text = messInfo.Content; Attach_Hid.Value = messInfo.Attachment; Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='UserManage.aspx'>用户管理</a></li><li>查看短消息</li>"); } }
protected void Page_Load(object sender, EventArgs e) { ViewState["MsgID"] = Request.QueryString["id"].ToString(); if (!Page.IsPostBack) { B_Admin badmin = new B_Admin(); badmin.CheckMulitLogin(); if (!badmin.ChkPermissions("MessManage")) { function.WriteErrMsg("没有权限进行此项操作"); } M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(ViewState["MsgID"].ToString())); this.LblSender.Text = messInfo.Sender.ToString(); this.LblIncept.Text = messInfo.Incept.ToString(); this.LblSendTime.Text = messInfo.PostDate.ToString(); this.LblTitle.Text = messInfo.Title; this.LblContent.Text = messInfo.Content; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!B_ARoleAuth.Check(ZLEnum.Auth.user, "MessManage")) { function.WriteErrMsg("没有权限进行此项操作"); } if (!string.IsNullOrEmpty(base.Request.QueryString["id"])) { m_msg = B_Message.GetMessByID(DataConverter.CLng(base.Request.QueryString["id"])); if (!m_msg.IsNull) { this.InceptUser_T.Text = m_msg.Sender; this.RadIncept3.Checked = true; this.TxtTitle.Text = "回复:" + m_msg.Title; } } } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='UserManage.aspx'>用户管理</a></li><li><a href='MessageSend.aspx'>信息发送</a></li><li>发送短消息</li>");; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { B_Admin badmin = new B_Admin(); badmin.CheckMulitLogin(); if (!badmin.ChkPermissions("MessManage")) { function.WriteErrMsg("没有权限进行此项操作"); } if (!string.IsNullOrEmpty(base.Request.QueryString["id"])) { M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(base.Request.QueryString["id"])); if (!messInfo.IsNull) { this.TxtInceptUser.Text = messInfo.Sender; this.RadIncept3.Checked = true; this.TxtTitle.Text = "回复:" + messInfo.Title; } } } }
public string GetStatus(int msgID, string type) { M_Message msg = B_Message.GetMessByID(msgID); if (msg.IsDelInbox == 1) { return("已删除"); } if (msg.IsDelInbox == -1) { return("已清"); } switch (type) { case "incept": return(msg.status == 1 ? "已读" : "未读"); case "sender": return(msg.Savedata == 0 ? "已发" : "草稿"); default: return(""); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { M_UserInfo mu = buser.GetLogin(); M_Message messInfo = B_Message.GetMessByID(Mid); if (messInfo == null) { function.WriteErrMsg("邮件不存在"); } if (!msgBll.AllowRead(messInfo.MsgID, mu.UserID.ToString())) { function.WriteErrMsg("无权限阅读该邮件!!!"); } LblSender.Text = "<a href='MessageSend.aspx?id=" + Mid + "'>" + buser.GetUserNameByIDS(messInfo.Sender) + "</a>"; string userNames = buser.GetUserNameByIDS(messInfo.Incept.ToString()); LblIncept.Text = StringHelper.SubStr(userNames); LblSendTime.Text = messInfo.PostDate.ToString("yyyy年MM月dd日 HH:mm"); LblTitle.Text = messInfo.Title; txt_Content.Text = messInfo.Content; Attach_Hid.Value = messInfo.Attachment; if (!string.IsNullOrEmpty(Request.QueryString["read"])) { string ccuser = "******" + mu.UserID + ","; if (messInfo.CCUser.IndexOf(ccuser) > -1) { CC_Btn.Visible = false; } if (messInfo.ReadUser.IndexOf("," + mu.UserID + ",") == -1) { messInfo.ReadUser += mu.UserID.ToString(); messInfo.status = 1; B_Message.Update(messInfo); } } } }
protected void Page_Load(object sender, EventArgs e) { B_User.CheckIsLogged();//检测是否登录BinarySearch M_UserInfo info = buser.GetLogin(); if (info.IsNull) { Response.Redirect("Login.aspx"); } if (function.isAjax()) { string GID = Request.Form["GID"]; string UID = Request.Form["UID"]; string usernames; usernames = GetByGroupID(GID); } if (!IsPostBack) { string uid = Request.QueryString["uid"]; this.User_T.Text = buser.GetUserNameByIDS(uid); if (!string.IsNullOrEmpty(base.Request.QueryString["id"])) { M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(base.Request.QueryString["id"])); if (!messInfo.IsNull) { this.User_T.Text = buser.GetUserNameByIDS(messInfo.Sender); this.TxtTitle.Text = "回复:" + messInfo.Title; } } if (!string.IsNullOrEmpty(base.Request.QueryString["ToID"])) { M_UserInfo messInfo = buser.GetUserByUserID(DataConverter.CLng(base.Request.QueryString["ToID"])); if (!messInfo.IsNull) { this.User_T.Text = messInfo.HoneyName; } } int SentoID = DataConverter.CLng(base.Request.QueryString["userid"]); string titlestr = base.Request.QueryString["title"]; if (buser.IsExit(SentoID)) { M_UserInfo userinfo = buser.GetUserByUserID(SentoID); this.User_T.Text = userinfo.HoneyName; this.TxtTitle.Text = titlestr; } if (!string.IsNullOrEmpty(base.Request.QueryString["Drafid"])) { M_Message messInfo = B_Message.GetMessByID(DataConverter.CLng(base.Request.QueryString["Drafid"])); this.User_T.Text = buser.GetUserNameByIDS(messInfo.Incept); this.TxtTitle.Text = messInfo.Title; this.EditorContent.Text = messInfo.Content; if (!string.IsNullOrEmpty(messInfo.Attachment)) { hasFileData.Value = messInfo.Attachment + ","; string[] af = messInfo.Attachment.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string h = ""; for (int i = 0; i < af.Length; i++) { h += "<span class='disupFile'>"; h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i])); h += "<a target='_blank' href=" + af[i] + ">" + af[i].Split('/')[(af[i].Split('/').Length - 1)] + "</a><a href='javascript:;' title='删除' onclick='delHasFile(\"" + af[i] + "\",this);' ><img src='/App_Themes/AdminDefaultTheme/images/del.png'/></a></span>"; } hasFileTD.InnerHtml = h; } } } }