Exemplo n.º 1
0
 public void InitPage()
 {
     if (Request.QueryString["merID"] != null)
     {
         int merID = Convert.ToInt32(Request.QueryString["merID"]);
         DAL.OveralManaDAL.MsgManaDAL md = new DAL.OveralManaDAL.MsgManaDAL();
         DAL.OveralManaDAL.AuthMana   at = new DAL.OveralManaDAL.AuthMana();
         int adminID = at.getAdminIDByName(Session["adminUserName"].ToString());
         MessageRpt.DataSource = md.getAdminMsgList(adminID, merID);
         MessageRpt.DataBind();
     }
 }
 protected void AssureBtn_Click(object sender, EventArgs e)
 {
     if (TitleBox.Text.Length > 0 && MsgContent.Value.Length > 0)
     {
         DAL.OveralManaDAL.MsgManaDAL ms = new DAL.OveralManaDAL.MsgManaDAL();
         DAL.OveralManaDAL.AuthMana   at = new DAL.OveralManaDAL.AuthMana();
         int adminID = at.getAdminIDByName(Session["adminUserName"].ToString());
         if (ms.informToMer(adminID, TitleBox.Text, MsgContent.Value) > 0)
         {
             InitPage();
         }
     }
     else
     {
         alertMessage("通知的标题和内容不能为空!");
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 确认发送消息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void AssureBtn_Click(object sender, EventArgs e)
 {
     if (TitleBox.Text.Length > 0 && MsgContent.Value.Length > 0)
     {
         DAL.OveralManaDAL.AuthMana at = new DAL.OveralManaDAL.AuthMana();
         int adminID = at.getAdminIDByName(Session["adminUserName"].ToString());
         int merID   = Convert.ToInt32(Request.QueryString["merID"]);
         DAL.OveralManaDAL.MsgManaDAL md = new DAL.OveralManaDAL.MsgManaDAL();
         int i = md.insertNewMsgA2M(adminID, merID, TitleBox.Text, MsgContent.Value);
         if (i > 0)
         {
             // Response.Write("<script>alert('消息发送成功');</script>");
             InitPage();
             MsgContent.Value = "";
             TitleBox.Text    = "";
         }
     }
     else
     {
         alertMessage("消息的标题和内容不能为空!");
     }
 }