public ActionResult GetPassWord_Mobile() { if (!ZoomlaSecurityCenter.VCodeCheck(Request.Form["VCode_hid"], Request.Form["VCode"])) { function.WriteErrMsg("验证码不正确", "/User/Change/GetPassword"); return(Content("")); } M_UserInfo mu = GetUserByName(Request.Form["TxtUserName"]); M_Uinfo basemu = buser.GetUserBaseByuserid(mu.UserID); if (string.IsNullOrEmpty(basemu.Mobile)) { function.WriteErrMsg("用户未设置手机号,无法通过手机号找回"); return(Content("")); } string code = function.GetRandomString(6, 2); string content = "【" + SiteConfig.SiteInfo.SiteName + "】,你正在使用找回密码服务,校验码:" + code; SendWebSMS.SendMessage(basemu.Mobile, content); //短信信息存入数据库 M_Message messInfo = new M_Message(); messInfo.Title = "验证码:找回密码"; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToLocalTime().ToString()); messInfo.Content = content; messInfo.Receipt = ""; messInfo.MsgType = 3; messInfo.status = 1; messInfo.Incept = mu.UserID.ToString(); B_Message.Add(messInfo); mu.seturl = code; buser.UpdateByID(mu); GetPwdStep = "mobile_code"; return(View("GetPassWord")); }
public void Option() { if (!string.IsNullOrEmpty(Request["menu"])) { DataBind(); string uname = string.Empty; M_CommonData b_CommonData = cbll.GetCommonData(DataConverter.CLng(Request.QueryString["id"])); switch (Request["menu"]) { case "Audit": messInfo.Sender = "1"; messInfo.Title = "店铺审核通知_通过"; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = "店铺审核通知_通过"; messInfo.Receipt = ""; uname = b_CommonData.Inputer; string[] namearrr = uname.Split(new char[] { ',' }); for (int i = 0; i < namearrr.Length; i++) { messInfo.Incept = namearrr[i]; B_Message.Add(messInfo); } b_CommonData.Status = 99; cbll.Update(b_CommonData); Response.Write("<script language=javascript>alert('通过审核!并已发送短消息通知');location.href='StoreManage.aspx';</script>"); break; default: break; } } }
//存草稿// protected void Button1_Click(object sender, EventArgs e) { B_Message message = new B_Message(); if (Page.IsValid) { M_Message messInfo = new M_Message(); if (!string.IsNullOrEmpty(Request.QueryString["Drafid"])) { messInfo = message.SelReturnModel(Convert.ToInt32(Request.QueryString["Drafid"])); } User_T.Text = StrHelper.RemoveDupByIDS(User_T.Text); messInfo.Incept = buser.SelUserIDByOA(User_T.Text); messInfo.Sender = buser.GetLogin().UserID.ToString(); messInfo.Title = this.TxtTitle.Text; messInfo.PostDate = DateTime.Now; messInfo.Content = this.EditorContent.Text; messInfo.Savedata = 1; messInfo.Receipt = ""; messInfo.Attachment = SaveFile(); if (!string.IsNullOrEmpty(Request.QueryString["Drafid"])) { messInfo.Attachment = (hasFileData.Value + "," + SaveFile()).Trim(','); B_Message.Update(messInfo); } else { message.GetInsert(messInfo); } } Response.Redirect("MessageDraftbox.aspx"); }
protected void Page_Load(object sender, EventArgs e) { B_User buser = new B_User(); buser.CheckIsLogin(); this.LblSiteName.Text = SiteConfig.SiteInfo.SiteName; string UserName = HttpContext.Current.Request.Cookies["UserState"]["LoginName"]; M_UserInfo info = buser.GetUserByName(UserName); if (info.IsNull) { Response.Redirect("Login.aspx"); } else { this.LblUserName.Text = info.UserName; this.LblEmail.Text = info.Email; this.LblGroupName.Text = info.GroupID.ToString(); this.LblUnreadMsg.Text = B_Message.UserMessCount(UserName).ToString(); this.LblRegTime.Text = info.RegTime.ToString(); this.LblLoginTimes.Text = info.LoginTimes.ToString(); this.LblLastLoginTime.Text = info.LastLoginTimes.ToString(); this.LblLastLoginIP.Text = info.LastLoginIP; this.LblLastLockTime.Text = info.LastLockTime.ToString(); this.LblChgPswTime.Text = info.LastPwdChangeTime.ToString(); } }
private void Bind() { string UserName = HttpContext.Current.Request.Cookies["UserState"]["LoginName"]; this.GridView1.DataSource = B_Message.SeachByUserName(UserName).DefaultView; GridView1.DataKeyNames = new string[] { "MsgID" }; this.GridView1.DataBind(); }
private void SetStatus(M_UserInfo info) { this.LitUserName.Text = info.UserName; this.LitLoginTime.Text = "登录次数:" + info.LoginTimes + "次"; this.LitLoginDate.Text = "最近登录:" + info.LastLoginTimes.ToString(); this.LitMessage.Text = "未读信息:" + B_Message.UserMessCount(info.UserName); this.PnlLoginStatus.Visible = true; this.PnlLogin.Visible = false; this.PnlLoginMessage.Visible = false; }
//发送 protected void BtnSend_Click(object sender, EventArgs e) { M_UserInfo mu = buser.GetLogin(); if (mu.MailSize != -1)//邮箱容量检测 { float surSize = CheckMailSize(mu); float upSize = 0; for (int i = 0; i < Request.Files.Count; i++) { if (Request.Files[i].ContentLength < 1) { continue; } upSize += float.Parse((Request.Files[i].ContentLength / 1024f / 1024f).ToString("0.0")); } if (surSize <= upSize)//如果剩余容量小于该次上传的附件容量 { function.Script(this, "alert('邮箱空间已满,无法发送邮件:" + MailRemind(mu) + "');"); return; } } M_Message messInfo = new M_Message(); if (!string.IsNullOrEmpty(Request.QueryString["Drafid"])) { messInfo = msgBll.SelReturnModel(Convert.ToInt32(Request.QueryString["Drafid"])); } string UserID = buser.GetLogin().UserID.ToString(); //发送 messInfo.Incept = buser.GetIdsByUserName(User_T.Text.Trim()); messInfo.Sender = UserID; messInfo.Title = this.TxtTitle.Text; messInfo.PostDate = DataConverter.CDate(DateTime.Now); messInfo.Content = this.EditorContent.Text; messInfo.Savedata = 0; messInfo.Receipt = ""; messInfo.CCUser = buser.SelUserIDByOA(CCUser_T.Text.Trim()); if (string.IsNullOrEmpty(messInfo.Incept.Replace(",", ""))) { function.WriteErrMsg("收件人不存在,请检测输入是否正确"); } messInfo.Attachment = SaveFile().TrimEnd(','); if (!string.IsNullOrEmpty(Request.QueryString["Drafid"])) { messInfo.Attachment = (hasFileData.Value + "," + SaveFile()).Trim(','); B_Message.Update(messInfo); } else { msgBll.GetInsert(messInfo); } Response.Redirect("MessageOutbox.aspx"); }
protected void Row_Command(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DeleteMsg") { int MsgID = DataConverter.CLng(e.CommandArgument.ToString()); B_Message.DelteById(MsgID); Bind(); } if (e.CommandName == "ReadMsg") { Response.Redirect("MessageRead.aspx?id=" + e.CommandArgument.ToString()); } }
/// <summary> /// 批量删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button2_Click(object sender, EventArgs e) { for (int i = 0; i <= GridView1.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("cheCk"); if (cbox.Checked == true) { int MsgID = Convert.ToInt32(GridView1.DataKeys[i].Value); B_Message.DelteById(MsgID); } } Bind(); }
//发送手机验证码(步骤1或步骤2的) public string SendValidCode(string key, string vcode, string mobile) { if (!B_User.CheckIsLogged(Request.RawUrl)) { return(null); } B_Safe_Mobile mbBll = new B_Safe_Mobile(); basemu = buser.GetUserBaseByuserid(buser.GetLogin().UserID); CheckNum = ""; NewCheckNum = ""; switch (Step) { case 2: NewCheckNum = function.GetRandomString(6, 2).ToLower(); basemu.Mobile = mobile; break; default: CheckNum = function.GetRandomString(6, 2).ToLower(); break; } if (!ZoomlaSecurityCenter.VCodeCheck(key, vcode)) { retMod.retmsg = "验证码不正确"; } else { if (mbBll.CheckMobile(basemu.Mobile)) { string content = "【" + SiteConfig.SiteInfo.SiteName + "】你正在使用修改手机号服务,校验码:" + CheckNum + NewCheckNum; SendWebSMS.SendMessage(basemu.Mobile, content); M_Message messInfo = new M_Message(); messInfo.Sender = basemu.UserId.ToString(); messInfo.Title = "验证码:修改手机号[" + basemu.Mobile + "]"; messInfo.Content = content; messInfo.Receipt = ""; messInfo.MsgType = 2; messInfo.status = 1; messInfo.Incept = basemu.UserId.ToString(); B_Message.Add(messInfo); retMod.retcode = M_APIResult.Success; retMod.retmsg = "校验码已成功发送到你的手机"; } else { retMod.retmsg = "禁止向该号码发送短信,请联系管理员"; } } return(retMod.ToString()); }
private void DataBind(string key = "") { DataTable dt = new DataTable(); string UserID = buser.GetLogin().UserID.ToString(); dt = B_Message.SeachSendMessage(UserID, 0, 1); if (!string.IsNullOrEmpty(key.Trim())) { dt.DefaultView.RowFilter = "Title Like '%" + key + "%'"; } EGV.DataSource = dt; EGV.DataBind(); Session["UserDT"] = null; }
protected void addMessage() { M_Message messInfo = new M_Message(); B_User bll = new B_User(); messInfo.Sender = buser.GetLogin().UserName; messInfo.Title = "[" + this.TxtInceptUser.Text.Trim() + "]的手机短信"; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = this.EditorContent.Text.Trim(); messInfo.Receipt = ""; messInfo.MsgType = 2; messInfo.Incept = buser.GetIdsByUserName(TxtInceptUser.Text.Trim()); B_Message.Add(messInfo); }
//英文状态下的逗号将用户名隔开实现多会员同时删除 protected void BtnDelSender_Click(object sender, EventArgs e) { string incept = this.TxtSender.Text; if (!string.IsNullOrEmpty(incept)) { string[] inarr = incept.Split(new char[] { ',' }); for (int i = 0; i < inarr.Length; i++) { B_Message.DeleteByUser(inarr[i]); } } Bind(); }
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 BtnSend_Click(object sender, EventArgs e) { if (Page.IsValid) { M_Message messInfo = new M_Message(); messInfo.Incept = this.TxtInceptUser.Text; string UserName = HttpContext.Current.Request.Cookies["UserState"]["UserName"]; messInfo.Sender = UserName; messInfo.Title = this.TxtTitle.Text; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = this.EditorContent.Text; B_Message.Add(messInfo); Response.Redirect("Message.aspx"); } }
protected void Send_Btn_Click(object sender, EventArgs e) { if (Page.IsValid) { M_Message messInfo = new M_Message(); messInfo.Sender = badmin.GetAdminLogin().AdminId.ToString(); messInfo.Title = this.TxtTitle.Text; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToLocalTime().ToString()); messInfo.Content = this.EditorContent.Text; messInfo.Receipt = ""; messInfo.MsgType = 1; messInfo.status = 1; messInfo.Attachment = Attach_Hid.Value; messInfo.Incept = InceptUser_Hid.Value.Trim(','); if (this.RadIncept1.Checked) { DataTable dt = UserDT; string id = ""; foreach (DataRow dr in dt.Rows) { id += dr["UserID"].ToString() + ","; } id = id.TrimEnd(','); if (dt != null) { dt.Dispose(); } messInfo.Incept = id; B_Message.Add(messInfo); function.WriteSuccessMsg("短信息已成功发送!", "Message.aspx"); } if (this.RadIncept3.Checked) { if (string.IsNullOrEmpty(messInfo.Incept)) { function.WriteErrMsg("收件人不存在!"); } string uname = this.InceptUser_T.Text; if (!string.IsNullOrEmpty(uname)) { B_Message.Add(messInfo); function.WriteSuccessMsg("短信息已成功发送!", "Message.aspx"); } } } }
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 Button1_Click(object sender, EventArgs e) { if (this.t_sendNo.Text != null && this.t_sendNo.Text.Trim() != "" && this.s_memo.Text.Trim() != "" && this.s_memo.Text != null) { SendWebSMS.SendMessage(this.t_sendNo.Text.Trim(), this.s_memo.Text.Trim()); M_Message messInfo = new M_Message(); messInfo.Sender = badmin.GetAdminLogin().AdminId.ToString(); messInfo.Title = "手机信息"; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToLocalTime().ToString()); messInfo.Content = s_memo.Text; messInfo.Receipt = ""; messInfo.MsgType = 2; messInfo.status = 1; B_Message.Add(messInfo); function.WriteSuccessMsg("发送成功!"); } }
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 BtnSend_Click(object sender, EventArgs e) { if (Page.IsValid) { M_Message messInfo = new M_Message(); B_User bll = new B_User(); messInfo.Sender = "admin"; messInfo.Title = this.TxtTitle.Text; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = this.EditorContent.Text; if (this.RadIncept1.Checked) { DataTable dt = bll.GetUserInfos(); foreach (DataRow dr in dt.Rows) { //if (dr["UserName"].ToString() != "admin") //{ messInfo.Incept = dr["UserName"].ToString(); B_Message.Add(messInfo); //} } } if (this.RadIncept3.Checked) { string uname = this.TxtInceptUser.Text; if (!string.IsNullOrEmpty(uname)) { string[] namearr = uname.Split(new char[] { ',' }); for (int i = 0; i < namearr.Length; i++) { messInfo.Incept = namearr[i]; B_Message.Add(messInfo); } } } } }
public void ProcessRequest(HttpContext context) { //弹出提示存Cookies中吧,用于标记是否弹出过 B_User buser = new B_User(); string result = ""; DataTable dt = new DataTable(); string action = context.Request.Form["action"]; switch (action) { case "GetUnreadMail": //Default.aspx B_Message msgBll = new B_Message(); dt = msgBll.GetUnReadMail(buser.GetLogin().UserID); if (dt.Rows.Count > 0) { result = "{\"num\":\"" + dt.Rows.Count + "\"}"; } else { result = "0"; } break; case "GetAffir": //待办公文和事务 //B_OA_Document oaBll = new B_OA_Document(); //dt = oaBll.SelByRefer(buser.GetLogin().UserID, 1); //DataTable dt2 = oaBll.SelByDocType(buser.GetLogin().UserID, 1,1); // result = "{\"affair\":\"" + dt.Rows.Count + "\",\"affair2\":\""+dt2.Rows.Count+"\"}"; break; default: result = "-1"; break; } context.Response.Write(result); context.Response.End(); }
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 msgsendBtn_Click(object sender, EventArgs e) { M_CommonData b_CommonData = cbll.GetCommonData(DataConverter.CLng(Request.QueryString["id"])); string uname = string.Empty; b_CommonData.Status = 0; cbll.Update(b_CommonData); messInfo.Sender = "1"; messInfo.Title = "店铺审核通知_未通过"; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = this.msgContent.Text; messInfo.Receipt = ""; uname = b_CommonData.Inputer; string[] namearr = uname.Split(new char[] { ',' }); for (int i = 0; i < namearr.Length; i++) { messInfo.Incept = namearr[i]; B_Message.Add(messInfo); } Response.Write("<script language=javascript>alert('店铺未通过审核,并已发送短消息通知!');location.href='StoreManage.aspx';</script>"); Response.Flush(); Response.Close(); Response.Write("<script language=javascript>tb_remove();</script>"); }
//删除多少日前的已读短消息 protected void BtnDelDate_Click(object sender, EventArgs e) { B_Message.DeleteByDate(DataConverter.CLng(DropDelDate.SelectedValue)); MyBind(); }
private void Bind() { this.GridView1.DataSource = B_Message.GetMessAll();//这样取得数据库中的数据,似乎写的不对 GridView1.DataKeyNames = new string[] { "MsgID" }; this.GridView1.DataBind(); }