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 Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(Page.User.Identity.Name)) { Response.Redirect("/login.aspx?url=" + Page.Request.Url.ToString()); } if (ViewState["InfoType"] == null) { if (Page.Request.QueryString["type"] != null) { this.InfoType = Page.Request.QueryString["type"].ToString().Trim(); if (this.InfoType != "All" && this.InfoType != "Merchant" && this.InfoType != "Capital" && this.InfoType != "Project" && this.InfoType != "Carveout" && this.InfoType != "Oppor") { this.InfoType = "All"; } } else { this.InfoType = "All"; } ViewState["InfoType"] = this.InfoType; } else { this.InfoType = ViewState["InfoType"].ToString(); } if (!IsPostBack) { Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL(); string LoginName = Page.User.Identity.Name; //string LoginName = "liyanlili"; string strCriteria = "LoginName='" + LoginName + "'"; DataView dv = bll.GetMerberInfo("LoginName,IsRefresh", strCriteria, "", ref intCurrentPage, intCurrentPageSize, ref intTotalCount); if (dv == null || dv.Table.Rows.Count == 0) { //Tz888.Common.MessageBox.Show(this.Page, "已经设置为:以后不再提醒!"); Tz888.Common.MessageBox.Show(this.Page, "用户信息异常!"); //this.Page.Response.Flush(); //this.Page.Response.End(); return; } int strDayMsg = Convert.ToInt32(dv.Table.Rows[0]["IsRefresh"]); if (strDayMsg == 0) { Tz888.Common.MessageBox.Show(this.Page, "当前设置为不提醒!"); } else { ViewState["InfoType"] = InfoType; RefreshList(); } } }
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() + "条"); } } }
public void RefreshList() { Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL(); this.InfoType = ViewState["InfoType"].ToString(); string LoginName = Page.User.Identity.Name; //string LoginName = "heyi"; dlrefresh.DataSource = bll.GetRefreshList(LoginName, this.InfoType); dlrefresh.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(Page.User.Identity.Name)) { Response.Redirect("/login.aspx?url=" + Page.Request.Url.ToString()); } if (Page.User.IsInRole("GT1002") || Page.User.IsInRole("GT1003")) { this.plRefreshSet_Topfo.Visible = true; this.plRefreshSet_General.Visible = false; } else { this.plRefreshSet_Topfo.Visible = false; this.plRefreshSet_General.Visible = true; } if (!IsPostBack) { Tz888.BLL.Login.MemberBLL bll = new Tz888.BLL.Login.MemberBLL(); string LoginName = Page.User.Identity.Name; //string LoginName = "liyanlili"; string strCriteria = "LoginName='" + LoginName + "'"; long intCurrentPage = 1; long intCurrentPageSize = 1; long intTotalCount = 0; DataView dv = bll.GetMerberInfo("LoginName,IsRefresh", strCriteria, "", ref intCurrentPage, intCurrentPageSize, ref intTotalCount); int strDayMsg = 0; if (dv != null && dv.Count > 0) { strDayMsg = Convert.ToInt32(dv.Table.Rows[0]["IsRefresh"]); } if (strDayMsg == 0) { this.RbtnDel.Checked = true; } else { this.RbtnSet.Checked = true; } } }
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; } }