private void ShowInfo(int UserId)
 {
     NoName.NetShop.BLL.MemberModelBll bll=new NoName.NetShop.BLL.MemberModelBll();
     NoName.NetShop.Model.MemberModel model=bll.GetModel(UserId);
     this.lblUserEmail.Text=model.UserEmail;
     this.lblPassword.Text=model.Password;
     this.lblNickName.Text=model.NickName;
     this.lblAllScore.Text=model.AllScore.ToString();
     this.lblCurScore.Text=model.CurScore.ToString();
     this.lblLastLogin.Text=model.LastLogin.ToString();
     this.lblLoginIP.Text=model.LoginIP;
     this.lblRegisterTime.Text=model.RegisterTime.ToString();
     this.lblModifyTime.Text=model.ModifyTime.ToString();
 }
示例#2
0
 private void ShowInfo(int UserId)
 {
     NoName.NetShop.BLL.MemberModelBll bll   = new NoName.NetShop.BLL.MemberModelBll();
     NoName.NetShop.Model.MemberModel  model = bll.GetModel(UserId);
     this.lblUserEmail.Text    = model.UserEmail;
     this.lblPassword.Text     = model.Password;
     this.lblNickName.Text     = model.NickName;
     this.lblAllScore.Text     = model.AllScore.ToString();
     this.lblCurScore.Text     = model.CurScore.ToString();
     this.lblLastLogin.Text    = model.LastLogin.ToString();
     this.lblLoginIP.Text      = model.LoginIP;
     this.lblRegisterTime.Text = model.RegisterTime.ToString();
     this.lblModifyTime.Text   = model.ModifyTime.ToString();
 }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtUserEmail.Text =="")
            {
            strErr+="UserEmail����Ϊ�գ�\\n";
            }
            if(this.txtPassword.Text =="")
            {
            strErr+="Password����Ϊ�գ�\\n";
            }
            if(this.txtNickName.Text =="")
            {
            strErr+="NickName����Ϊ�գ�\\n";
            }
            if(!PageValidate.IsNumber(txtAllScore.Text))
            {
            strErr+="AllScore�������֣�\\n";
            }
            if(!PageValidate.IsNumber(txtCurScore.Text))
            {
            strErr+="CurScore�������֣�\\n";
            }
            if(!PageValidate.IsDateTime(txtLastLogin.Text))
            {
            strErr+="LastLogin����ʱ���ʽ��\\n";
            }
            if(this.txtLoginIP.Text =="")
            {
            strErr+="LoginIP����Ϊ�գ�\\n";
            }
            if(!PageValidate.IsDateTime(txtRegisterTime.Text))
            {
            strErr+="RegisterTime����ʱ���ʽ��\\n";
            }
            if(!PageValidate.IsDateTime(txtModifyTime.Text))
            {
            strErr+="ModifyTime����ʱ���ʽ��\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            string UserEmail=this.txtUserEmail.Text;
            string Password=this.txtPassword.Text;
            string NickName=this.txtNickName.Text;
            int AllScore=int.Parse(this.txtAllScore.Text);
            int CurScore=int.Parse(this.txtCurScore.Text);
            DateTime LastLogin=DateTime.Parse(this.txtLastLogin.Text);
            string LoginIP=this.txtLoginIP.Text;
            DateTime RegisterTime=DateTime.Parse(this.txtRegisterTime.Text);
            DateTime ModifyTime=DateTime.Parse(this.txtModifyTime.Text);

            NoName.NetShop.Model.MemberModel model=new NoName.NetShop.Model.MemberModel();
            model.UserEmail=UserEmail;
            model.Password=Password;
            model.NickName=NickName;
            model.AllScore=AllScore;
            model.CurScore=CurScore;
            model.LastLogin=LastLogin;
            model.LoginIP=LoginIP;
            model.RegisterTime=RegisterTime;
            model.ModifyTime=ModifyTime;

            NoName.NetShop.BLL.MemberModelBll bll=new NoName.NetShop.BLL.MemberModelBll();
            bll.Update(model);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtUserEmail.Text == "")
            {
                strErr += "UserEmail不能为空!\\n";
            }
            if (this.txtPassword.Text == "")
            {
                strErr += "Password不能为空!\\n";
            }
            if (this.txtNickName.Text == "")
            {
                strErr += "NickName不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtAllScore.Text))
            {
                strErr += "AllScore不是数字!\\n";
            }
            if (!PageValidate.IsNumber(txtCurScore.Text))
            {
                strErr += "CurScore不是数字!\\n";
            }
            if (!PageValidate.IsDateTime(txtLastLogin.Text))
            {
                strErr += "LastLogin不是时间格式!\\n";
            }
            if (this.txtLoginIP.Text == "")
            {
                strErr += "LoginIP不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtRegisterTime.Text))
            {
                strErr += "RegisterTime不是时间格式!\\n";
            }
            if (!PageValidate.IsDateTime(txtModifyTime.Text))
            {
                strErr += "ModifyTime不是时间格式!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string   UserEmail    = this.txtUserEmail.Text;
            string   Password     = this.txtPassword.Text;
            string   NickName     = this.txtNickName.Text;
            int      AllScore     = int.Parse(this.txtAllScore.Text);
            int      CurScore     = int.Parse(this.txtCurScore.Text);
            DateTime LastLogin    = DateTime.Parse(this.txtLastLogin.Text);
            string   LoginIP      = this.txtLoginIP.Text;
            DateTime RegisterTime = DateTime.Parse(this.txtRegisterTime.Text);
            DateTime ModifyTime   = DateTime.Parse(this.txtModifyTime.Text);

            NoName.NetShop.Model.MemberModel model = new NoName.NetShop.Model.MemberModel();
            model.UserEmail    = UserEmail;
            model.Password     = Password;
            model.NickName     = NickName;
            model.AllScore     = AllScore;
            model.CurScore     = CurScore;
            model.LastLogin    = LastLogin;
            model.LoginIP      = LoginIP;
            model.RegisterTime = RegisterTime;
            model.ModifyTime   = ModifyTime;

            NoName.NetShop.BLL.MemberModelBll bll = new NoName.NetShop.BLL.MemberModelBll();
            bll.Add(model);
        }