protected void btnSave_Click(object sender, EventArgs e) { Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL(); string LoginName = Page.User.Identity.Name; //string LoginName = "liyanlili"; if (!Tz888.Common.Utility.PageValidate.IsNumber("5")) { Tz888.Common.MessageBox.Show(this.Page, "刷新时间输入不正确!"); return; } int IsRefresh = 0; if (this.RbtnSet.Checked == true) { IsRefresh = 5; } bool HasLoad = bll.RefreshMemberInfo(LoginName, IsRefresh); if (!HasLoad) { Tz888.Common.MessageBox.Show(this.Page, "信息刷新提醒设置失败!"); return; } else { Tz888.Common.MessageBox.Show(this.Page, "信息刷新提醒设置成功!"); return; } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (chkRefreshMsg.Checked == true) { Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL(); string LoginName = Page.User.Identity.Name; //string LoginName = "heyi"; int IsRefresh = 0; bool HasLoad = bll.RefreshMemberInfo(LoginName, IsRefresh); if (!HasLoad) { Tz888.Common.MessageBox.Show(this.Page, "没有找到您需要的数据!"); return; } else { Tz888.Common.MessageBox.Show(this.Page, "已经设置为:以后不再提醒!"); btnClose.Visible = true; return; } } else { int intSelect = 0; int intSuccess = 0; CheckBox chkSelect; Label lblInfo; Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL(); for (int i = 0; i < dlrefresh.Items.Count; i++) { chkSelect = (CheckBox)dlrefresh.Items[i].FindControl("chkSelect"); lblInfo = (Label)dlrefresh.Items[i].FindControl("lblInfo"); if (chkSelect.Checked) { intSelect++; //将选中的信息的时间更新为此刻时间 long InfoID = Convert.ToInt64(lblInfo.Text.Trim()); if (bll.UpdateRefresh(InfoID)) { intSuccess++; } } } if (intSelect.ToString().Trim() == "0") { Tz888.Common.MessageBox.Show(this.Page, "您没有选择信息!"); return; } else { //报告操作成功 Tz888.Common.MessageBox.Show(this.Page, "选择信息" + intSelect.ToString() + "条,实际更新 " + intSuccess.ToString() + "条"); } } }
protected void btnCancel_Click(object sender, EventArgs e) { Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL(); string LoginName = Page.User.Identity.Name; //string LoginName = "liyanlili"; int IsRefresh = 0; bool HasLoad = bll.RefreshMemberInfo(LoginName, IsRefresh); if (!HasLoad) { Tz888.Common.MessageBox.Show(this.Page, "信息刷新提醒关闭失败!"); this.RbtnDel.Checked = false; return; } else { Tz888.Common.MessageBox.Show(this.Page, "信息刷新提醒已关闭!"); this.RbtnDel.Checked = true; return; } }