1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows;
- using InABox.DynamicGrid;
- using InABox.Logikal;
- namespace PRSDesktop;
- public class LogikalProjectGrid : DynamicItemsListGrid<LogikalProject>
- {
- public LogikalProjectGrid()
- {
- }
- protected override void DoReconfigure(DynamicGridOptions options)
- {
- base.DoReconfigure(options);
- options.FilterRows = true;
- options.HideDatabaseFilters = true;
- }
- }
- public partial class LogikalProjectImport : Window
- {
- public LogikalProjectImport()
- {
- InitializeComponent();
- using (var client = new LogikalClient())
- {
- if (client.Connect() == LogikalStatus.Ok)
- {
- if (client.Login() == LogikalStatus.Ok)
- {
- Projects.Items =
- client.ProjectList()?.OfType<LogikalProject>().ToList()
- ?? new List<LogikalProject>();
- Projects.Refresh(true,true);
- }
- }
- }
- }
- private void OK_Click(object sender, RoutedEventArgs e)
- {
- DialogResult = true;
- }
- private void Cancel_Click(object sender, RoutedEventArgs e)
- {
- DialogResult = false;
- }
- }
|