public void OnAttributeUpdate(object sender, EventArgs e) { if (AttributeTableView.SelectedRows != null && (int)AttributeTableView.SelectedRows.Count > 0) { var row = (int)AttributeTableView.SelectedRows.FirstIndex; var dto = RelyingPartyDto.AttributeConsumerServices [row]; NSApplication.SharedApplication.StopModal(); var defaultExists = RelyingPartyDto.AttributeConsumerServices.Exists(x => x.IsDefault); var form = new AddNewAttributeConsumerServiceController() { DefaultSet = defaultExists, AttributeConsumerServiceDto = dto }; NSApplication.SharedApplication.RunModalForWindow(form.Window); if (form.IsUpdated != null) { RelyingPartyDto.AttributeConsumerServices.RemoveAt(row); RelyingPartyDto.AttributeConsumerServices.Add(form.AttributeConsumerServiceDto); var datasource = new AttributeConsumerServiceDataSource { Entries = RelyingPartyDto.AttributeConsumerServices }; AttributeTableView.DataSource = datasource; AttributeTableView.ReloadData(); } } }
public void OnAddAttributeServices(object sender, EventArgs e) { NSApplication.SharedApplication.StopModal(); var defaultExists = RelyingPartyDto.AttributeConsumerServices.Exists(x => x.IsDefault); var form = new AddNewAttributeConsumerServiceController() { DefaultSet = defaultExists }; NSApplication.SharedApplication.RunModalForWindow(form.Window); if (form.AttributeConsumerServiceDto != null) { RelyingPartyDto.AttributeConsumerServices.Add(form.AttributeConsumerServiceDto); var datasource = new AttributeConsumerServiceDataSource { Entries = RelyingPartyDto.AttributeConsumerServices }; AttributeTableView.DataSource = datasource; AttributeTableView.ReloadData(); } }
public void OnAddAttributeServices (object sender, EventArgs e) { NSApplication.SharedApplication.StopModal (); var defaultExists = RelyingPartyDto.AttributeConsumerServices.Exists (x => x.IsDefault); var form = new AddNewAttributeConsumerServiceController (){ DefaultSet = defaultExists }; NSApplication.SharedApplication.RunModalForWindow (form.Window); if (form.AttributeConsumerServiceDto != null) { RelyingPartyDto.AttributeConsumerServices.Add (form.AttributeConsumerServiceDto); var datasource = new AttributeConsumerServiceDataSource { Entries = RelyingPartyDto.AttributeConsumerServices }; AttributeTableView.DataSource = datasource; AttributeTableView.ReloadData (); } }
public void OnAttributeUpdate (object sender, EventArgs e) { if (AttributeTableView.SelectedRows != null && (int)AttributeTableView.SelectedRows.Count > 0) { var row = (int)AttributeTableView.SelectedRows.FirstIndex; var dto = RelyingPartyDto.AttributeConsumerServices [row]; NSApplication.SharedApplication.StopModal (); var defaultExists = RelyingPartyDto.AttributeConsumerServices.Exists (x => x.IsDefault); var form = new AddNewAttributeConsumerServiceController (){ DefaultSet = defaultExists, AttributeConsumerServiceDto = dto }; NSApplication.SharedApplication.RunModalForWindow (form.Window); if (form.IsUpdated != null) { RelyingPartyDto.AttributeConsumerServices.RemoveAt (row); RelyingPartyDto.AttributeConsumerServices.Add (form.AttributeConsumerServiceDto); var datasource = new AttributeConsumerServiceDataSource { Entries = RelyingPartyDto.AttributeConsumerServices }; AttributeTableView.DataSource = datasource; AttributeTableView.ReloadData (); } } }
public TableDelegate(AddNewAttributeConsumerServiceController controller) { _controller = controller; }
public TableDelegate (AddNewAttributeConsumerServiceController controller) { _controller = controller; }