Beispiel #1
0
 public bool EditAdmin(AdminUIModel admin)
 {
     try
     {
         return(DBProvider.AdminDBProvider.EditAdmin(admin.UserName, admin.LoginPassword, admin.ActionPassword, admin.GroupType, admin.Mac));
     }
     catch (Exception exc)
     {
         LogHelper.Instance.AddErrorLog("Edit Admin Exception", exc);
         return(false);
     }
 }
Beispiel #2
0
        public EditAdminWindow(bool isAdd, AdminUIModel admin)
        {
            InitializeComponent();

            this._isAdd = isAdd;
            if (isAdd)
            {
                this.txtUserName.IsReadOnly = false;
                this.Title = "添加管理员";
            }
            else
            {
                this._admin                 = admin;
                this.txtUserName.Text       = admin.UserName;
                this.txtMac.Text            = admin.Mac;
                this.txtUserName.IsReadOnly = true;
                this.Title = "修改管理员";
            }
        }