public UCAppDomainEntry(ResourceView view) { this.view = view; DialogResult = System.Windows.Forms.DialogResult.None; InitializeComponent(); var loginTypes = view.GetLoginTypes(); cmbLoginType.DataSource = loginTypes; cmbLoginType.DisplayMember = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.Title); cmbLoginType.ValueMember = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.LoginTypeId); }
public UCAppDomainEntry(TransMode mode, ApplicationDomainDto appDomain, ResourceView view) { DialogResult = System.Windows.Forms.DialogResult.None; this.view = view; InitializeComponent(); this.mode = mode; this.ApplicationDomain = appDomain; var loginTypes = view.GetLoginTypes(); cmbLoginType.DataSource = loginTypes; cmbLoginType.DisplayMember = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.Title); cmbLoginType.ValueMember = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.LoginTypeId); if (mode == TransMode.EditRecord || mode == TransMode.ViewRecord) { txtTitle.Text = appDomain.Title; chkEnable.Checked = appDomain.IsEnabled; chkLock.Checked = appDomain.IsLocked; if (appDomain.LoginTypeId != null) { cmbLoginType.SelectedValue = appDomain.LoginTypeId; } } }