void AddCertificate()
        {
            var serverDto = GetServerDto();

            ActionHelper.Execute(delegate()
            {
                var tenantName = GetTenant().DisplayName;
                var frm        = new NewSignerIdentity(this.GetServiceGateway(), serverDto, tenantName);
                if (this.SnapIn.Console.ShowDialog(frm) == DialogResult.OK)
                {
                    View.Refresh();
                }
            }, null);
        }
示例#2
0
        void AddTenant()
        {
            var auth = (AuthTokenDto)Tag;

            if (auth.Token == null)
            {
                MMCDlgHelper.ShowMessage("Please login with an account with administrator privileges to Add Tenant");
                return;
            }
            ActionHelper.Execute(delegate
            {
                var frm = new NewSignerIdentity(this.GetServiceGateway(), _serverDto);
                if (this.SnapIn.Console.ShowDialog(frm) == DialogResult.OK)
                {
                    var tenantDto = (TenantDto)frm.DataContext;
                    if (tenantDto != null)
                    {
                        MMCDlgHelper.ShowMessage("Tenant " + tenantDto.Name + " created successfully.");
                    }
                }
            }, null);
        }