123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- using comal.timesheets.CustomControls;
- using Comal.Classes;
- using InABox.Clients;
- using InABox.Core;
- using Plugin.Media;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using Xamarin.CommunityToolkit.Extensions;
- using Xamarin.CommunityToolkit.UI.Views;
- using Xamarin.Essentials;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- using XF.Material.Forms.UI.Dialogs;
- using PRSSecurity = InABox.Core.Security;
- namespace comal.timesheets
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class Warehousing2 : ContentPage
- {
- public Warehousing2 ()
- {
- InitializeComponent ();
- descriptionLbl3.Text = "View holdings or movements" + System.Environment.NewLine
- + "Use a holding for creating stock movements";
- receivalsDescriptionLbl.Text = "From incoming delivery " + System.Environment.NewLine
- + "Also receives stock items to PRS";
- }
- private void Receivals_Tapped(object sender, EventArgs e)
- {
- PurchaseOrderPage purchaseOrderPage = new PurchaseOrderPage();
- Navigation.PushAsync(purchaseOrderPage);
- }
- private void Frame0_Tapped(object sender, EventArgs e) //issue module
- {
- RecTrans recTrans = new RecTrans(StockMovementBatchType.Issue);
- Navigation.PushAsync(recTrans);
- }
- private void Frame1_Tapped(object sender, EventArgs e) //transfer module
- {
- RecTrans recTrans = new RecTrans(StockMovementBatchType.Transfer);
- Navigation.PushAsync(recTrans);
- }
- private void Frame2_Tapped(object sender, EventArgs e) //relocate
- {
- if (PRSSecurity.CanEdit<StockLocation>())
- {
- RelocatePage relocatePage = new RelocatePage();
- Navigation.PushAsync(relocatePage);
- }
- else
- {
- DisplayAlert("Not allowed", "Please check security setting: Can Edit Stock Locations", "OK");
- return;
- }
- }
- private void Frame3_Tapped(object sender, EventArgs e)
- {
- if (GlobalVariables.ProductsLoaded)
- {
- ProductList products = new ProductList(GlobalVariables.ProductShells);
- Navigation.PushAsync(products);
- }
- else
- {
- ProductList products = new ProductList();
- Navigation.PushAsync(products);
- }
- //if (ClientFactory.IsAllowed<CanViewStockLocations>())
- //{
- // if (GlobalVariables.ProductsLoaded)
- // {
- // ProductList products = new ProductList(GlobalVariables.ProductShells);
- // Navigation.PushAsync(products);
- // }
- // else
- // {
- // ProductList products = new ProductList();
- // Navigation.PushAsync(products);
- // }
- //}
- //else
- //{
- // DisplayAlert("Alert", "Your current security settings do not allow you to view this module"
- // + System.Environment.NewLine + "(Setting - Can View Stock Locations)", "OK");
- //}
- }
- private void Frame4_Tapped(object sender, EventArgs e)
- {
- WarehouseSelectionPage warehouseSelectionPage = new WarehouseSelectionPage();
- Navigation.PushAsync(warehouseSelectionPage);
- //if (ClientFactory.IsAllowed<CanViewStockMovements>())
- //{
- // WarehouseSelectionPage warehouseSelectionPage = new WarehouseSelectionPage();
- // Navigation.PushAsync(warehouseSelectionPage);
- //}
- //else
- //{
- // DisplayAlert("Alert", "Your current security settings do not allow you to view this module"
- // + System.Environment.NewLine + "(Setting - Can View Stock Movements)", "OK");
- //}
- }
- private void Frame5_Tapped(object sender, EventArgs e)
- {
- StocktakePage stocktakePage = new StocktakePage(Guid.Empty);
- Navigation.PushAsync(stocktakePage);
- }
- }
- }
|