コード例 #1
0
 public void fengAndJieUser(int userid)
 {
     BLL.userTb userBll = new BLL.userTb();
     Model.userTb userM = userBll.GetModel(userid);
     if (userM.state == "1")
     {
         userM.state = "0";
     }
     else
     {
         userM.state = "1";
     }
     userBll.Update(userM);
 }
コード例 #2
0
        protected void btnOK_Click(object sender, EventArgs e)
        {
            /*         BLL.userTb bllutb = new BLL.userTb();
            List<Model.userTb> listmodelutb = bllutb.GetModelList("1=1");
            foreach (Model.userTb u in listmodelutb)
            {
                if (u.userEmail == loginemail)
                {
                    u.userPwd = this.txtpwd.Text;
                    bllutb.Update(u);
                }
            }     */

            if (this.txtpwd.Text == "" || this.txtpwdagain.Text == "")
            {
                this.lblmsg3.Visible = true;
                this.lblmsg4.Visible=false;
                this.lblmsg5.Visible = false;
            }
            if (this.txtpwd.Text != this.txtpwdagain.Text && this.txtpwd.Text != "" && this.txtpwdagain.Text != "")
            {
                this.lblmsg3.Visible = false;
                this.lblmsg4.Visible = true;
                this.lblmsg5.Visible = false;
            }
            if (this.txtpwd.Text == this.txtpwdagain.Text && this.txtpwd.Text != "" && this.txtpwdagain.Text != "")
            {
                BLL.userTb bllutb = new BLL.userTb();
                List<Model.userTb> listmodelutb = bllutb.GetModelList("1=1");
                listmodelutb[0].userPwd = this.txtpwd.Text;
                bllutb.Update(listmodelutb[0]);
                this.lblmsg3.Visible = false;
                this.lblmsg4.Visible = false;
                this.lblmsg5.Visible = true;
            }
        }