Beispiel #1
0
 /// <summary>
 /// 填充Model
 /// </summary>
 private MDL.T_Users GetData()
 {
     MDL.T_Users users = new T_Users();
     users.login     = MyCommon.ToSqlString(this.txtLogin.Text.Trim());
     users.password  = HandlePwd.Encrypt(this.txtpasswd.Text.Trim());
     users.fullname  = MyCommon.ToSqlString(this.txtFullname.Text.Trim());
     users.title     = MyCommon.ToSqlString(this.txtTitle.Text.Trim());
     users.phone     = MyCommon.ToSqlString(this.txtphone.Text.Trim());
     users.units     = MyCommon.ToSqlString(this.cmbUnits.Text.Trim());
     users.unitstype = MyCommon.ToSqlString(this.cmbUnitsType.Text.Trim());
     return(users);
 }
Beispiel #2
0
 /// <summary>
 /// 保存数据
 /// </summary>
 private void SaveData()
 {
     if (!ValidatorData())
     {
         return;
     }
     else
     {
         string          confrmpw = HandlePwd.Encrypt(txtConfrmPasswd.Text.Trim());
         BLL.T_Users_BLL userBLL  = new ERM.BLL.T_Users_BLL();
         MDL.T_Users     UsersMDL = userBLL.Find(Globals.UserID);
         UsersMDL.password = confrmpw;
         userBLL.Update(UsersMDL);
         this.Close();
     }
 }