Exemple #1
0
 private void CloseEditUserControl()
 {
     CloseModalPanel(_editUserControl, DevComponents.DotNetBar.Controls.eSlideSide.Right);
     _editUserControl.Dispose();
     _editUserControl = null;
     ui_users_buttonX_edit.Enabled = true;
 }
Exemple #2
0
        private void ui_users_buttonX_edit_Click(object sender, EventArgs e)
        {
            if (ui_users_dgridX_users.SelectedRows.Count == 0) return;

            var name = ui_users_dgridX_users.SelectedRows[0].Cells["ui_users_dGridCol_Login"].Value.ToString();
            var oldUserInfo = _users.Find(a => a.Name == name);

            ui_users_buttonX_edit.Enabled = false;

            _editUserControl = new EditUserControl
            {
                ui_textBoxX_login = { Text = oldUserInfo.Name },
                ui_textBoxX_name = { Text = oldUserInfo.FullName },
                ui_textBoxX_phone = { Text = oldUserInfo.Phone },
                ui_textBoxX_email = { Text = oldUserInfo.Email },
                ui_textBoxX_password = { Text = oldUserInfo.Password },
                ui_textBoxX_repassword = { Text = oldUserInfo.Password },
                ui_textBoxX_ip = { Text = oldUserInfo.IpAdress },
                ui_switchButton_allowCollecting = { Value = oldUserInfo.AllowCollectFrCqg },
                ui_switchButton_allowUser = { Value = !oldUserInfo.Blocked },
                ui_switchButton_any_Ip = { Value = oldUserInfo.AllowAnyIp },
                ui_switchButton_allwoMissingBar = { Value = oldUserInfo.AllowMissBars },
                ui_switchButton_enableDataNet = { Value = oldUserInfo.AllowDataNet },
                ui_switchButton_enableTickNet = { Value = oldUserInfo.AllowTickNet },
                ui_switchButton_local = { Value = oldUserInfo.AllowLocalDb },
                ui_switchButton_share = { Value = oldUserInfo.AllowRemoteDb },
                uiPermissionDataExport = { Value = oldUserInfo.AllowDexport },
                Commands = _commands,
                Tag = 0
            };
            ShowModalPanel(_editUserControl, DevComponents.DotNetBar.Controls.eSlideSide.Right);
        }