private void ShowInfo(int UserId)
 {
     NoName.NetShop.BLL.UserModelBll bll=new NoName.NetShop.BLL.UserModelBll();
     NoName.NetShop.Model.UserModel model=bll.GetModel(UserId);
     this.lblUserName.Text=model.UserName;
     this.lblUserEmail.Text=model.UserEmail;
     this.lblPassword.Text=model.Password;
     this.lblLastLoginTime.Text=model.LastLoginTime.ToString();
 }
 private void ShowInfo(int UserId)
 {
     NoName.NetShop.BLL.UserModelBll bll   = new NoName.NetShop.BLL.UserModelBll();
     NoName.NetShop.Model.UserModel  model = bll.GetModel(UserId);
     this.lblUserName.Text      = model.UserName;
     this.lblUserEmail.Text     = model.UserEmail;
     this.lblPassword.Text      = model.Password;
     this.lblLastLoginTime.Text = model.LastLoginTime.ToString();
 }
Example #3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtUserName.Text == "")
            {
                strErr += "UserName不能为空!\\n";
            }
            if (this.txtUserEmail.Text == "")
            {
                strErr += "UserEmail不能为空!\\n";
            }
            if (this.txtPassword.Text == "")
            {
                strErr += "Password不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtLastLoginTime.Text))
            {
                strErr += "LastLoginTime不是时间格式!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string   UserName      = this.txtUserName.Text;
            string   UserEmail     = this.txtUserEmail.Text;
            string   Password      = this.txtPassword.Text;
            DateTime LastLoginTime = DateTime.Parse(this.txtLastLoginTime.Text);


            NoName.NetShop.Model.UserModel model = new NoName.NetShop.Model.UserModel();
            model.UserName      = UserName;
            model.UserEmail     = UserEmail;
            model.Password      = Password;
            model.LastLoginTime = LastLoginTime;

            NoName.NetShop.BLL.UserModelBll bll = new NoName.NetShop.BLL.UserModelBll();
            bll.Update(model);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtUserName.Text =="")
            {
            strErr+="UserName����Ϊ�գ�\\n";
            }
            if(this.txtUserEmail.Text =="")
            {
            strErr+="UserEmail����Ϊ�գ�\\n";
            }
            if(this.txtPassword.Text =="")
            {
            strErr+="Password����Ϊ�գ�\\n";
            }
            if(!PageValidate.IsDateTime(txtLastLoginTime.Text))
            {
            strErr+="LastLoginTime����ʱ���ʽ��\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            string UserName=this.txtUserName.Text;
            string UserEmail=this.txtUserEmail.Text;
            string Password=this.txtPassword.Text;
            DateTime LastLoginTime=DateTime.Parse(this.txtLastLoginTime.Text);

            NoName.NetShop.Model.UserModel model=new NoName.NetShop.Model.UserModel();
            model.UserName=UserName;
            model.UserEmail=UserEmail;
            model.Password=Password;
            model.LastLoginTime=LastLoginTime;

            NoName.NetShop.BLL.UserModelBll bll=new NoName.NetShop.BLL.UserModelBll();
            bll.Update(model);
        }