private void RptBind(string strWhere) { DtCms.BLL.Member bll = new DtCms.BLL.Member(); //获得总条数 this.pcount = bll.GetCount(strWhere); if (this.pcount > 0) { this.lbtnDel.Enabled = true; } else { this.lbtnDel.Enabled = false; } this.rptList.DataSource = bll.GetPageList(this.pagesize, this.page, strWhere, "AddTime desc"); this.rptList.DataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { string Code = txtCode.Text.Trim(); string UserName = txtUserName.Text.Trim(); string pwd = txtpwd.Text.Trim(); if (Code.ToLower() != (Session["DtCode"].ToString()).ToLower()) { Response.Write("<script>alert('您输入的验证码与系统的不一致!');</script>"); return; } if (string.IsNullOrEmpty(UserName)) { Response.Write("<script>alert('请输入会员名!');</script>"); return; } if (string.IsNullOrEmpty(pwd)) { Response.Write("<script>alert('请输入密码!');</script>"); return; } DtCms.Model.Member member = new DtCms.Model.Member(); member.Username = UserName; member.Pwd = pwd; DtCms.BLL.Member bll = new DtCms.BLL.Member(); if (bll.GetCount(" Username='******' and Pwd='" + pwd + "' ") > 0) { Session["Member"] = UserName; Response.Write("<script>alert('登录成功!');window.location.href='index.aspx'</script>"); } else { Response.Write("<script>alert('登录失败,会员名或密码输入错误!');</script>"); } }