Пример #1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtUserName.Text.Trim().Length == 0)
            {
                strErr += "用户名称不能为空!\\n";
            }
            if (this.txtPassWord.Text.Trim().Length == 0)
            {
                strErr += "用户密码不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string UserID   = this.lblUserID.Text;
            string UserName = this.txtUserName.Text;
            string PassWord = this.txtPassWord.Text;


            FwjSoft.Model.UserInfo model = new FwjSoft.Model.UserInfo();
            model.UserID   = UserID;
            model.UserName = UserName;
            model.PassWord = PassWord;

            FwjSoft.BLL.UserInfo bll = new FwjSoft.BLL.UserInfo();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Пример #2
0
 private void ShowInfo(string UserID)
 {
     FwjSoft.BLL.UserInfo   bll   = new FwjSoft.BLL.UserInfo();
     FwjSoft.Model.UserInfo model = bll.GetModel(UserID);
     this.lblUserID.Text   = model.UserID;
     this.lblUserName.Text = model.UserName;
     this.lblPassWord.Text = model.PassWord;
 }