12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using Comal.Classes;
- using InABox.Clients;
- using InABox.Core;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- using XF.Material.Forms.UI.Dialogs;
- namespace comal.timesheets
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class EquipmentTasksList : BasePage
- {
- private EquipmentDetailModel _equipment;
- public EquipmentDetailModel Equipment
- {
- get => _equipment;
- set
- {
- _equipment = value;
- listView.ItemsSource = _equipment.Kanbans.Where(x => !x.Completed.IsEmpty());
- }
- }
-
- public EquipmentTasksList()
- {
- InitializeComponent();
- }
-
- private async void Kanban_Tapped(object sender, EventArgs e)
- {
- await MaterialDialog.Instance.AlertAsync("FV: To be replaced with full Task Viewer");
- // if ((listView.SelectedItem is EquipmentKanbanShell item) && (item.Attachments != 0))
- // {
- // CoreTable table = new Client<KanbanDocument>().Query(
- // new Filter<KanbanDocument>(x => x.EntityLink.ID).IsEqualTo(item.KanbanID),
- // new Columns<KanbanDocument>(x => x.DocumentLink.FileName, x => x.DocumentLink.ID));
- // if (table.Rows.Any())
- // {
- // Dictionary<string, Guid> filenameIDS = new Dictionary<string, Guid>();
- // foreach (CoreRow row in table.Rows)
- // {
- // List<object> list = row.Values;
- // if (list[0] != null && list[1] != null)
- // {
- // filenameIDS.Add(list[0].ToString(), Guid.Parse(list[1].ToString()));
- // }
- // }
- //
- // if (filenameIDS.Count > 0)
- // {
- // PDFList pdflist = new PDFList(filenameIDS, true);
- // Navigation.PushAsync(pdflist);
- // }
- // }
- // }
- }
- }
- }
|