| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Comal.Classes;
- using InABox.Core;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- using XF.Material.Forms.UI.Dialogs;
- namespace PRS.Mobile
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class DeliveryEditFormsView
- {
- public DeliveryEditFormsView()
- {
- InitializeComponent();
- }
- public override void Refresh()
- {
- _forms.DataModel = ViewModel?.Forms;
- _forms.AppliesTo = "Assignment";
- _forms.Property = model => ViewModel?.Forms.Items.OfType<IDigitalFormInstanceShell>().ToArray();
- _forms.RefreshData(false,true);
- }
- public void CreateForm()
- {
- _forms.CreateNewForm(
- "Delivery",
- () => ViewModel.Forms.AddItem(),
- ViewModel.Item.ID,
- () =>
- {
- ViewModel.Forms.Search(null);
- Refresh();
- }
- );
- }
- private async void _forms_OnFormTapped(object sender, ExistingFormTappedEventArgs args)
- {
- _forms.EditFormAsync<Delivery,DeliveryLink,DeliveryForm>(
- args.Shell,
- ViewModel.Item.Entity
- );
- }
- }
- }
|