();
+
+ // Application info.
+ settings.Add("App name", AppInfo.Name);
+ settings.Add("Package name", AppInfo.PackageName);
+ settings.Add("Version", AppInfo.VersionString);
+ settings.Add("Build", AppInfo.BuildString);
+
+ // Main display info.
+ DisplayInfo mainDisplayInfo = DeviceDisplay.MainDisplayInfo;
+ settings.Add("Display", mainDisplayInfo.Width.ToString() + " x " + mainDisplayInfo.Height.ToString());
+ settings.Add("Density", mainDisplayInfo.Density.ToString());
+ settings.Add("Orientation", mainDisplayInfo.Orientation.ToString());
+ if (mainDisplayInfo.Rotation != DisplayRotation.Rotation0)
+ settings.Add("Rotation", mainDisplayInfo.Rotation.ToString());
+
+ // Application styling.
+ settings.Add("Font size ratio", SlmMobile.FontSizeRatio.ToString());
+
+ // Device info.
+ settings.Add("Model", DeviceInfo.Model);
+ settings.Add("Manufacturer", DeviceInfo.Manufacturer);
+ settings.Add("Device name", DeviceInfo.Name);
+ settings.Add("Device version", DeviceInfo.VersionString);
+ settings.Add("Platform", DeviceInfo.Platform.ToString());
+ settings.Add("Idiom", DeviceInfo.Idiom.ToString());
+ settings.Add("DeviceType", DeviceInfo.DeviceType.ToString());
+
+ // Version tracking.
+ if (VersionTracking.IsFirstLaunchEver)
+ settings.Add("First launch", VersionTracking.IsFirstLaunchEver.ToString());
+ if (VersionTracking.IsFirstLaunchForCurrentVersion)
+ settings.Add("First launch current", VersionTracking.IsFirstLaunchForCurrentVersion.ToString());
+ if (VersionTracking.IsFirstLaunchForCurrentBuild)
+ settings.Add("First launch build", VersionTracking.IsFirstLaunchForCurrentBuild.ToString());
+ settings.Add("Current version", VersionTracking.CurrentVersion);
+ settings.Add("Current build", VersionTracking.CurrentBuild);
+ settings.Add("Previous version", VersionTracking.PreviousVersion);
+ settings.Add("Previous build", VersionTracking.PreviousBuild);
+ settings.Add("First version", VersionTracking.FirstInstalledVersion);
+ settings.Add("First build", VersionTracking.FirstInstalledBuild);
+ settings.Add("Version history", VersionTracking.VersionHistory.Concat(", "));
+ settings.Add("Build history", VersionTracking.BuildHistory.Concat(", "));
+
+ // Populate settings.
+ int optionIdx = -1;
+ foreach (StringPair setting in settings)
+ {
+ optionIdx++;
+ settingsGrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
+ settingsGrid.Children.Add(new SlmLabel() { Text = setting.Item1, HorizontalOptions = LayoutOptions.Start }, 0, optionIdx);
+ settingsGrid.Children.Add(new SlmLabel() { Text = setting.Item2, HorizontalOptions = LayoutOptions.StartAndExpand }, 1, optionIdx);
+ }
+ }
+
+ //-------------------------------------------------------------------
+ // P a g e E v e n t s
+ //-------------------------------------------------------------------
+
+ //-------------------------------------------------------------------
+ }
+ //=======================================================================
+}
diff --git a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Pages/Templates/Page_Template_Main.cs b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Pages/Templates/Page_Template_Main.cs
index 19b08b2..3af54d7 100644
--- a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Pages/Templates/Page_Template_Main.cs
+++ b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Pages/Templates/Page_Template_Main.cs
@@ -108,6 +108,13 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Pages.Templates
pageBodyStack.Padding = new Thickness(4);
pageBodyScroll.Content = pageBodyStack;
+ // Hide menu when tapping on main page.
+ var bodyTapGestureRecognizer = new TapGestureRecognizer();
+ bodyTapGestureRecognizer.Tapped += (s, e) => { HideMenu(); };
+ //pageBody.GestureRecognizers.Add(bodyTapGestureRecognizer);
+ //pageBodyScroll.GestureRecognizers.Add(bodyTapGestureRecognizer);
+ pageBodyStack.GestureRecognizers.Add(bodyTapGestureRecognizer);
+
// Events.
}
@@ -137,8 +144,10 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Pages.Templates
}
private void ShowMenu ()
{
- double menuWidth = Math.Min(160, Math.Min(Width, Height) * 0.66);
- double menuHeight = Math.Min(200, Math.Min(Width, Height) * 0.66);
+ double menuWidth = Math.Min(180, Math.Min(Width, Height) * 0.66);
+ double menuHeight = Math.Min(320, Math.Min(Width, Height) * 0.66);
+ if (MenuView.MenuHeight > menuHeight && MenuView.MenuHeight < Height)
+ menuHeight = MenuView.MenuHeight;
Rectangle menuPosition = new Rectangle(pageBody.Width - menuWidth, 0, menuWidth, menuHeight);
pageBody.Children.Add(MenuView, menuPosition, AbsoluteLayoutFlags.None);
menuShown = true;
diff --git a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetMovement_SearchResults.cs b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetMovement_SearchResults.cs
index 2afa56f..24b0a33 100644
--- a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetMovement_SearchResults.cs
+++ b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetMovement_SearchResults.cs
@@ -141,10 +141,14 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Panels.Assets
// Compile search results info.
String info = "Matching assets found: " + assetMovementCount + "
";
info += "";
- info += "";
- foreach (ColumnDfn column in ColumnsToDisplay)
- info += "| " + column.Caption + " | ";
- info += "
";
+ if (assetMovementCount > 0)
+ {
+ // Column headers.
+ info += "";
+ foreach (ColumnDfn column in ColumnsToDisplay)
+ info += "| " + column.Caption + " | ";
+ info += "
";
+ }
int assetCount = 0;
foreach (SlmWebServiceItemData itemData in itemDataList)
{
diff --git a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Images.cs b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Images.cs
index 2759c0b..a57c26f 100644
--- a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Images.cs
+++ b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Images.cs
@@ -1,8 +1,11 @@
-using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
+using Sarand.LogisticsMgr.Core.Bus;
+using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
using Sarand.LogisticsMgr.Mobile.Core.Forms.Panels;
+using Sarand.LogisticsMgr.Mobile.Forms.Pages.Assets;
using System;
using System.Collections.Generic;
using System.Text;
+using Xamarin.Forms;
namespace Sarand.LogisticsMgr.Mobile.Forms.Panels.Assets
{
@@ -14,16 +17,86 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Panels.Assets
//-------------------------------------------------------------------
// Data members.
+ private List repairImages = new List();
+ private SlmLabel labelSummary = new SlmLabel();
+ private SlmGrid gridDetails = new SlmGrid();
//-------------------------------------------------------------------
// Construction.
public SlmPanel_AssetRepair_Images ()
{
- Caption = "Images";
+ InitialiseComponents();
}
//-------------------------------------------------------------------
// Properties.
+ public SlmPage_Assets_Repair AssetRepairPage { get; set; }
+ public List RepairImages => new List(repairImages);
+
+ //-------------------------------------------------------------------
+ // I n i t i a l i s e
+ //-------------------------------------------------------------------
+ private void InitialiseComponents ()
+ {
+ Caption = "Images";
+
+ // Summary panel.
+ labelSummary.HorizontalOptions = LayoutOptions.FillAndExpand;
+ SummaryPanel.Content = labelSummary;
+
+ // Details panel.
+ gridDetails.BackgroundColor = Color.Transparent;
+ gridDetails.MinimumHeightRequest = 56;
+ DetailsPanel.Content = gridDetails;
+
+ RefreshPanels();
+ }
+
+ //-------------------------------------------------------------------
+ // R e f r e s h
+ //-------------------------------------------------------------------
+ private void RefreshPanels ()
+ {
+ RefreshSummaryPanel();
+ RefreshDetailsPanel();
+ }
+ //-------------------------------------------------------------------
+ private void RefreshSummaryPanel ()
+ {
+ if (repairImages.Count == 0)
+ labelSummary.Text = "No images defined";
+ else if (repairImages.Count == 1)
+ labelSummary.Text = "1 image defined";
+ else
+ labelSummary.Text = repairImages.Count + " images defined";
+ }
+ //-------------------------------------------------------------------
+ private void RefreshDetailsPanel ()
+ {
+ }
+
+ //-------------------------------------------------------------------
+ // P a n e l E v e n t s
+ //-------------------------------------------------------------------
+ protected async override void ButtonAddItem_Clicked (object sender, EventArgs e)
+ {
+ SlmPage_Assets_RepairImage.Config pageConfig = new SlmPage_Assets_RepairImage.Config(AssetRepairPage.CompanyId);
+ SlmPage_Assets_RepairImage page = new SlmPage_Assets_RepairImage(pageConfig);
+ page.Disappearing += (sender2, e2) =>
+ {
+ if (!page.Cancelled)
+ {
+ SlmAssetRepairImage.Data repairImageData = page.NewAssetRepairImageData;
+ if (repairImageData != null)
+ {
+ repairImages.Add(repairImageData);
+ RefreshPanels();
+ DropDown();
+ }
+ }
+ };
+ await Application.Current.MainPage.Navigation.PushModalAsync(page, false);
+ }
//-------------------------------------------------------------------
}
diff --git a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Jobs.cs b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Jobs.cs
index a18de13..3337799 100644
--- a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Jobs.cs
+++ b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Panels/Assets/SlmPanel_AssetRepair_Jobs.cs
@@ -1,8 +1,13 @@
-using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
+using Sarand.Core.App;
+using Sarand.LogisticsMgr.Core.Bus;
+using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
using Sarand.LogisticsMgr.Mobile.Core.Forms.Panels;
+using Sarand.LogisticsMgr.Mobile.Core.Utils;
+using Sarand.LogisticsMgr.Mobile.Forms.Pages.Assets;
using System;
using System.Collections.Generic;
using System.Text;
+using Xamarin.Forms;
namespace Sarand.LogisticsMgr.Mobile.Forms.Panels.Assets
{
@@ -14,16 +19,138 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Panels.Assets
//-------------------------------------------------------------------
// Data members.
+ private List repairJobs = new List();
+ private SlmLabel labelSummary = new SlmLabel();
+ private SlmGrid gridDetails = new SlmGrid();
//-------------------------------------------------------------------
// Construction.
public SlmPanel_AssetRepair_Jobs ()
{
- Caption = "Jobs";
+ InitialiseComponents();
}
//-------------------------------------------------------------------
// Properties.
+ public SlmPage_Assets_Repair AssetRepairPage { get; set; }
+ public List RepairJobs => new List(repairJobs);
+
+ //-------------------------------------------------------------------
+ // I n i t i a l i s e
+ //-------------------------------------------------------------------
+ private void InitialiseComponents ()
+ {
+ Caption = "Jobs";
+
+ // Summary panel.
+ labelSummary.HorizontalOptions = LayoutOptions.FillAndExpand;
+ SummaryPanel.Content = labelSummary;
+
+ // Details panel.
+ gridDetails.BackgroundColor = Color.Transparent;
+ gridDetails.MinimumHeightRequest = 56;
+ gridDetails.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
+ gridDetails.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
+ gridDetails.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
+ DetailsPanel.Content = gridDetails;
+
+ RefreshPanels();
+ }
+
+ //-------------------------------------------------------------------
+ // R e f r e s h
+ //-------------------------------------------------------------------
+ private void RefreshPanels ()
+ {
+ RefreshSummaryPanel();
+ RefreshDetailsPanel();
+ }
+ //-------------------------------------------------------------------
+ private void RefreshSummaryPanel ()
+ {
+ if (repairJobs.Count == 0)
+ labelSummary.Text = "No jobs defined";
+ else if (repairJobs.Count == 1)
+ labelSummary.Text = "1 job defined";
+ else
+ labelSummary.Text = repairJobs.Count + " jobs defined";
+ }
+ //-------------------------------------------------------------------
+ private void RefreshDetailsPanel ()
+ {
+ gridDetails.Children.Clear();
+ gridDetails.RowDefinitions.Clear();
+ int rowIdx = -1;
+
+ // Display repair jobs.
+ foreach (SlmAssetRepairJob.Data repairJob in repairJobs)
+ {
+ // Repair Job display info.
+ String repairJobDisplay = repairJob.LocationCode + "-" + repairJob.ComponentCode + "-" + repairJob.DamageCode + "-" + repairJob.RepairCode;
+
+ // Add repair job to grid.
+ rowIdx = gridDetails.RowDefinitions.Count;
+ gridDetails.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
+ gridDetails.Children.Add(new SlmLabel() { Text = repairJobDisplay }, 0, rowIdx);
+ // 'Update' button.
+ ImageButton buttonUpdate = new ImageButton()
+ {
+ Source = ImageUtils.GetImageFromByteArray(SacsResourceConsole.GetImageResource(SacsResourceConsole.ImageResource.IconShock_Pencil_Orange_72_png))
+ };
+ buttonUpdate.Pressed += (sender, evt) =>
+ {
+ // Update job.
+ SlmPage_Assets_RepairJob.Config pageConfig = new SlmPage_Assets_RepairJob.Config(AssetRepairPage.CompanyId);
+ pageConfig.AssetRepairJobToUpdate = repairJob;
+ SlmPage_Assets_RepairJob page = new SlmPage_Assets_RepairJob(pageConfig);
+ page.Disappearing += (sender2, e2) =>
+ {
+ if (page.Cancelled) return;
+ RefreshPanels();
+ };
+ Application.Current.MainPage.Navigation.PushModalAsync(page, false);
+ };
+ gridDetails.Children.Add(buttonUpdate, 1, rowIdx);
+ // 'Remove' button.
+ ImageButton buttonRemove = new ImageButton()
+ {
+ Source = ImageUtils.GetImageFromByteArray(SacsResourceConsole.GetImageResource(SacsResourceConsole.ImageResource.IconShock_TrashCan_Grey_72_png))
+ };
+ buttonRemove.Pressed += async (sender, evt) =>
+ {
+ // Confirm removal.
+ String msg = "Are you sure that job '" + repairJobDisplay + "' should be removed?";
+ if (!await AssetRepairPage.DisplayConfirm(msg)) return;
+ // Remove job from list and refresh.
+ repairJobs.Remove(repairJob);
+ RefreshPanels();
+ };
+ gridDetails.Children.Add(buttonRemove, 2, rowIdx);
+ }
+ }
+
+ //-------------------------------------------------------------------
+ // P a n e l E v e n t s
+ //-------------------------------------------------------------------
+ protected override void ButtonAddItem_Clicked (object sender, EventArgs e)
+ {
+ SlmPage_Assets_RepairJob.Config pageConfig = new SlmPage_Assets_RepairJob.Config(AssetRepairPage.CompanyId);
+ SlmPage_Assets_RepairJob page = new SlmPage_Assets_RepairJob(pageConfig);
+ page.Disappearing += (sender2, e2) =>
+ {
+ if (!page.Cancelled)
+ {
+ SlmAssetRepairJob.Data repairJobData = page.NewAssetRepairJobData;
+ if (repairJobData != null)
+ {
+ repairJobs.Add(repairJobData);
+ RefreshPanels();
+ DropDown();
+ }
+ }
+ };
+ Application.Current.MainPage.Navigation.PushModalAsync(page, false);
+ }
//-------------------------------------------------------------------
}
diff --git a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Views/SlmMenuView.cs b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Views/SlmMenuView.cs
index b9c3c95..7d1d15a 100644
--- a/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Views/SlmMenuView.cs
+++ b/LogisticsMgrMobile/LogisticsMgrMobile/Mobile/Forms/Views/SlmMenuView.cs
@@ -38,7 +38,7 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Views
// Menu grid.
menuGrid.BackgroundColor = Color.FromHex("#F0F0F0");
- menuGrid.Padding = new Thickness(4);
+ menuGrid.Padding = new Thickness(4,8);
menuGrid.RowSpacing = 2.0;
menuGrid.ColumnSpacing = 2.0;
menuGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(48) });
@@ -57,7 +57,7 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Views
optionImage = new Image() { Source = option.ImageSource, HeightRequest = 24, WidthRequest = 24 };
menuGrid.Children.Add(optionImage, 0, optionIdx);
}
- Label optionLabel = new Label() { Text = option.Caption, HeightRequest = 24, BackgroundColor = Color.Transparent };
+ SlmLabel optionLabel = new SlmLabel() { Text = option.Caption, HeightRequest = 24, BackgroundColor = Color.Transparent };
if (option.Heading)
optionLabel.FontAttributes = FontAttributes.Bold;
menuGrid.Children.Add(optionLabel, 1, optionIdx);
@@ -75,6 +75,7 @@ namespace Sarand.LogisticsMgr.Mobile.Forms.Views
//-------------------------------------------------------------------
// Properties.
public virtual List MenuOptions { get; }
+ public double MenuHeight => menuGrid.Height + menuGrid.Padding.Top + menuGrid.Padding.Bottom + SlmMobile.MenuBorder;
//-------------------------------------------------------------------
// M e n u E v e n t s
diff --git a/SaLogMgrMobCore/Mobile/Core/App/SlmApplication.cs b/SaLogMgrMobCore/Mobile/Core/App/SlmApplication.cs
index 824f331..6a3a6df 100644
--- a/SaLogMgrMobCore/Mobile/Core/App/SlmApplication.cs
+++ b/SaLogMgrMobCore/Mobile/Core/App/SlmApplication.cs
@@ -1,15 +1,17 @@
using Sarand.Core.Base;
+using Sarand.Core.Mobile.App;
using Sarand.LogisticsMgr.Core.App;
using Sarand.LogisticsMgr.Mobile.Core.CodeTypes;
using System;
using System.Collections.Generic;
using System.Text;
+using System.Threading.Tasks;
using Xamarin.Forms;
namespace Sarand.LogisticsMgr.Mobile.Core.App
{
//=======================================================================
- public abstract class SlmApplication : Application
+ public abstract class SlmApplication : SaxApplication
{
//-------------------------------------------------------------------
// Definitions.
@@ -26,6 +28,11 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
//-------------------------------------------------------------------
// Properties.
+ //-------------------------------------------------------------------
+ // W e b S e r v i c e
+ //-------------------------------------------------------------------
+ public abstract Task IsWebServiceAlive (SlmSiteDefinition siteDefinition);
+
//-------------------------------------------------------------------
// S i t e D e f i n i t i o n s
//-------------------------------------------------------------------
diff --git a/SaLogMgrMobCore/Mobile/Core/App/SlmMobile.cs b/SaLogMgrMobCore/Mobile/Core/App/SlmMobile.cs
index fce1f07..bc841d4 100644
--- a/SaLogMgrMobCore/Mobile/Core/App/SlmMobile.cs
+++ b/SaLogMgrMobCore/Mobile/Core/App/SlmMobile.cs
@@ -1,5 +1,7 @@
-using System;
+using Sarand.Core.Mobile.App;
+using System;
using System.Collections.Generic;
+using System.Globalization;
using System.Text;
using Xamarin.Forms;
@@ -24,6 +26,12 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
public static String AppTitle { get; } = "Sarand LogisticsMgr";
// Utilities.
public static Random Random { get; } = new Random();
+
+ //-------------------------------------------------------------------
+ // Localisation.
+ public static CultureInfo CultureInfo => CultureInfo.CurrentCulture;
+ public static TextInfo TextInfo => CultureInfo.TextInfo;
+
//-------------------------------------------------------------------
// Application styling.
public static double ApplicationBarHeight = 28;
@@ -34,6 +42,17 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
public static double ApplicationBarBorderBottom = 1.0;
public static Color MenuBorderColor = Color.DarkSlateBlue;
public static double MenuBorder = 1.0;
+ // Dynamic font sizing.
+ public static double FontSizeRatio
+ {
+ get
+ {
+ if (SaxApplication.MinDeviceDimension > 2000) return 1.75;
+ if (SaxApplication.MinDeviceDimension > 1600) return 1.50;
+ if (SaxApplication.MinDeviceDimension > 1200) return 1.25;
+ return 1.0;
+ }
+ }
// Pages.
public static Color PageCaptionBackgroundColor = Color.FromHex("#558395");
public static double PageCaptionPaddingHorizontal = 4.0;
@@ -53,6 +72,11 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
public static Color ControlBorderColor = Color.FromHex("#f8f8f8");
public static double ControlBorderWidth = 0.5;
public static Thickness LabelMargin { get; } = new Thickness(4.0, 8.0, 0, 0);
+ // Associated items panel.
+ public static Color AssociatedItemsCaptionBackgroundColor = Color.FromHex("#becee4");
+ public static Color AssociatedItemsCaptionTextColor = Color.FromHex("#f8f8f8");
+ public static double AssociatedItemsCaptionTextSizeRatio = 1.2;
+ public static Color AssociatedItemsBackgroundColor = Color.FromHex("#dbe4f0");
//-------------------------------------------------------------------
}
diff --git a/SaLogMgrMobCore/Mobile/Core/CodeTypes/SlmCodeTypeConsole_Mobile.cs b/SaLogMgrMobCore/Mobile/Core/CodeTypes/SlmCodeTypeConsole_Mobile.cs
index e49993f..c74638b 100644
--- a/SaLogMgrMobCore/Mobile/Core/CodeTypes/SlmCodeTypeConsole_Mobile.cs
+++ b/SaLogMgrMobCore/Mobile/Core/CodeTypes/SlmCodeTypeConsole_Mobile.cs
@@ -42,6 +42,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
public String Email { get { return SessionProfile.Email; } }
public override bool DatabaseIsValid { get { return true; } }
public override bool CanUpdateDatabase { get { return true; } }
+ public bool Populating { get; private set; } = false;
+ public bool Populated { get; private set; } = false;
//-------------------------------------------------------------------
// R e f r e s h C o d e T y p e s
@@ -65,6 +67,9 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
public void RefreshCodeTypes ()
{
String fn = GetType().Name + ".RefreshCodeTypes";
+ Populated = false;
+ Populating = true;
+
// Cancel previous refresh.
if (refreshTaskData != null)
{
@@ -117,6 +122,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
codeTypes = refreshTaskData.CodeTypes;
this.codeTypeCodes = codeTypeCodes;
if (refreshTaskData.Debug) Logger.Debug(fn + " Code types: " + codeTypes.Count + ". Codes: " + codeTypeCodes.Count);
+ Populating = false;
+ Populated = true;
// Dispose the class refresh data.
if (this.refreshTaskData == refreshTaskData)
{
@@ -205,7 +212,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
// Item construction properties.
SysId id = itemData.GetIdValue(SaCodeType.Column.Id);
String code = itemData.GetValue(SaCodeType.Column.Code);
- ushort flags = (ushort)itemData.GetIntValue(SaCodeType.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SaCodeType.Column.Flags);
// Create item.
SlmCodeType_Mobile saCodeType = new SlmCodeType_Mobile(id, code, flags);
// Populate item properties.
@@ -277,7 +284,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
SysId id = itemData.GetIdValue(SaCode.Column.Id);
SysId codeTypeId = itemData.GetIdValue(SaCode.Column.CodeTypeId);
String code = itemData.GetValue(SaCode.Column.Code);
- ushort flags = (ushort)itemData.GetIntValue(SaCode.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SaCode.Column.Flags);
// Create item.
SlmCode_Mobile saCode = new SlmCode_Mobile(id, codeTypeId, code, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmControlView.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmControlView.cs
index 1ef6857..22b533a 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmControlView.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmControlView.cs
@@ -20,7 +20,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
// Components.
private SlmContentView outerView = new SlmContentView();
private SlmContentView embeddedView = new SlmContentView();
- private readonly SlmLabel label = new SlmLabel() { Text = "" };
+ private readonly SlmLabel label = new SlmLabel();
// Styling.
private Thickness borderThickness = new Thickness();
private Color borderColor = Color.Transparent;
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntry.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntry.cs
index 835c8c8..2984ab2 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntry.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntry.cs
@@ -1,4 +1,5 @@
using Sarand.Core.Mobile.Forms.Controls;
+using Sarand.LogisticsMgr.Mobile.Core.App;
using System;
using System.Collections.Generic;
using System.Text;
@@ -19,6 +20,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
// Construction.
public SlmEntry ()
{
+ // Font sizing.
+ FontSize = FontSize * SlmMobile.FontSizeRatio;
}
//-------------------------------------------------------------------
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntryView.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntryView.cs
index 485138d..80e3b2a 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntryView.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmEntryView.cs
@@ -1,4 +1,5 @@
using Sarand.Core.Base;
+using Sarand.Core.Mobile.Forms.Controls;
using Sarand.LogisticsMgr.Mobile.Core.App;
using System;
using System.Collections.Generic;
@@ -42,6 +43,21 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
get { return entry.MaxLength; }
set { entry.MaxLength = value; }
}
+ public SaxEntry.TextCaseType TextCase
+ {
+ get { return entry.TextCase; }
+ set { entry.TextCase = value; }
+ }
+ public bool NumericOnly
+ {
+ get { return entry.NumericOnly; }
+ set { entry.NumericOnly = value; }
+ }
+ public byte Decimals
+ {
+ get { return entry.Decimals; }
+ set { entry.Decimals = value; }
+ }
public Keyboard Keyboard
{
get { return entry.Keyboard; }
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFormPage.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFormPage.cs
index ad76037..1902408 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFormPage.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFormPage.cs
@@ -20,9 +20,14 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
OkCancel,
Close
}
+ public class Config
+ {
+ public NavigationMode NavigationMode { get; set; } = NavigationMode.OkCancel;
+ }
//-------------------------------------------------------------------
// Data members.
+ private readonly Config config;
private SlmAccountMgr_Mobile accountMgr = null;
private SlmAssetMgr_Mobile assetMgr = null;
// Main grid.
@@ -42,7 +47,27 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
//-------------------------------------------------------------------
// Construction.
- public SlmFormPage ()
+ public SlmFormPage (Config config)
+ {
+ this.config = config;
+ InitialiseComponents();
+ ConfigureForm();
+ }
+
+ //-------------------------------------------------------------------
+ // Properties.
+ protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext; } }
+ protected SlmContentView FormBodyView { get { return contentViewBody; } }
+ public bool AddMode { get; protected set; } = true;
+ public bool Changed { get; protected set; } = false;
+ public bool Cancelled { get; private set; } = true;
+ // Managers.
+ protected SlmAccountMgr_Mobile AccountMgr { get { if (accountMgr == null) accountMgr = new SlmAccountMgr_Mobile(SessionContext); return accountMgr; } }
+ protected SlmAssetMgr_Mobile AssetMgr { get { if (assetMgr == null) assetMgr = new SlmAssetMgr_Mobile(SessionContext); return assetMgr; } }
+ //-------------------------------------------------------------------
+ // I n i t i a l i s e
+ //-------------------------------------------------------------------
+ private void InitialiseComponents ()
{
NavigationPage.SetHasNavigationBar(this, false);
BackgroundColor = SlmMobile.PageBaseColor;
@@ -88,32 +113,16 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
viewNavigation.Content = gridNavigation;
viewNavigation.Padding = new Thickness(0, SlmMobile.PageNavigationBorderTopWidth, 0, 0);
viewNavigation.BackgroundColor = SlmMobile.PageNavigationBorderColor;
- ConfigureNavigationBar();
buttonOk.Clicked += ButtonOk_Clicked;
buttonCancel.Clicked += ButtonCancel_Clicked;
buttonClose.Clicked += ButtonClose_Clicked;
}
//-------------------------------------------------------------------
- // Properties.
- protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext; } }
- protected SlmContentView FormBodyView { get { return contentViewBody; } }
- public bool Changed { get; protected set; } = false;
- // Managers.
- protected SlmAccountMgr_Mobile AccountMgr { get { if (accountMgr == null) accountMgr = new SlmAccountMgr_Mobile(SessionContext); return accountMgr; } }
- protected SlmAssetMgr_Mobile AssetMgr { get { if (assetMgr == null) assetMgr = new SlmAssetMgr_Mobile(SessionContext); return assetMgr; } }
-
+ // C o n f i g u r e F o r m
//-------------------------------------------------------------------
- // N a v i g a t i o n M o d e
- //-------------------------------------------------------------------
- private NavigationMode navigationMode = NavigationMode.OkCancel;
- protected NavigationMode SetNavigationMode ()
+ private void ConfigureForm ()
{
- return navigationMode;
- }
- protected void SetNavigationMode (NavigationMode mode)
- {
- navigationMode = mode;
ConfigureNavigationBar();
}
private void ConfigureNavigationBar ()
@@ -121,24 +130,29 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
gridNavigation.Margin = new Thickness(0);
gridNavigation.Padding = new Thickness(SlmMobile.PageBodyPaddingHorizontalMin, SlmMobile.PageNavigationPaddingVertical);
gridNavigation.RowSpacing = 4;
- gridNavigation.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
+ if (gridNavigation.RowDefinitions.Count == 0)
+ gridNavigation.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
gridNavigation.ColumnSpacing = 0;
- gridNavigation.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
- gridNavigation.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
- gridNavigation.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
+ if (gridNavigation.ColumnDefinitions.Count == 0)
+ {
+ gridNavigation.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
+ gridNavigation.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Star });
+ gridNavigation.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
+ }
gridNavigation.BackgroundColor = SlmMobile.PageNavigationBackgroundColor;
- if (navigationMode == NavigationMode.OkCancel)
+ if (config.NavigationMode == NavigationMode.OkCancel)
{
// OK & Cancel Buttons.
- gridNavigation.Children.Add(buttonCancel, 1, 0);
- gridNavigation.Children.Add(buttonOk, 3, 0);
+ buttonCancel.HorizontalOptions = LayoutOptions.Start;
+ gridNavigation.Children.Add(buttonCancel, 0, 0);
buttonOk.HorizontalOptions = LayoutOptions.End;
+ gridNavigation.Children.Add(buttonOk, 2, 0);
}
else
{
- gridNavigation.Children.Add(buttonClose, 2, 3);
buttonClose.HorizontalOptions = LayoutOptions.Center;
+ gridNavigation.Children.Add(buttonClose, 1, 0);
}
}
@@ -193,10 +207,12 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
/// Confirm that form is valid and details saved before closig the form page.
protected void ButtonOk_Clicked (object sender, EventArgs e)
{
- if (!SaveFormData()) return;
+ bool saveFormData = SaveFormData();
+ if (!saveFormData) return;
+ Cancelled = false;
CloseForm();
}
- protected virtual bool SaveFormData () { return true; }
+ protected virtual bool SaveFormData () { return false; }
//-------------------------------------------------------------------
/// Confirm that form is valid and details saved before closig the form page.
protected void ButtonCancel_Clicked (object sender, EventArgs e)
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFrame.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFrame.cs
new file mode 100644
index 0000000..f62c60d
--- /dev/null
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmFrame.cs
@@ -0,0 +1,29 @@
+using Sarand.Core.Mobile.Forms.Views;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
+{
+ //=======================================================================
+ public class SlmFrame : SaxFrame
+ {
+ //-------------------------------------------------------------------
+ // Definitions.
+
+ //-------------------------------------------------------------------
+ // Data members.
+
+ //-------------------------------------------------------------------
+ // Construction.
+ public SlmFrame ()
+ {
+ }
+
+ //-------------------------------------------------------------------
+ // Properties.
+
+ //-------------------------------------------------------------------
+ }
+ //=======================================================================
+}
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmLabel.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmLabel.cs
index 86f3f46..d844de7 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmLabel.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmLabel.cs
@@ -20,7 +20,11 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
// Construction.
public SlmLabel ()
{
+ // Styling.
Margin = SlmMobile.LabelMargin;
+
+ // Font sizing.
+ FontSize = FontSize * SlmMobile.FontSizeRatio;
}
//-------------------------------------------------------------------
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPicker.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPicker.cs
index 69a6cd2..8d60d19 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPicker.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPicker.cs
@@ -1,6 +1,7 @@
using Sarand.Core.Base;
using Sarand.Core.Bus;
using Sarand.Core.Mobile.Forms.Controls;
+using Sarand.LogisticsMgr.Mobile.Core.App;
using System;
using System.Collections.Generic;
using System.Text;
@@ -21,6 +22,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
// Construction.
public SlmPicker ()
{
+ // Font sizing.
+ FontSize = FontSize * SlmMobile.FontSizeRatio;
}
//-------------------------------------------------------------------
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPickerView.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPickerView.cs
index 2fa32f7..783f70e 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPickerView.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Base/SlmPickerView.cs
@@ -1,4 +1,5 @@
using Sarand.Core.Base;
+using Sarand.Core.Mobile.Forms.Controls;
using Sarand.LogisticsMgr.Mobile.Core.App;
using System;
using System.Collections.Generic;
@@ -31,6 +32,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
picker.Unfocused += Picker_Unfocused;
picker.BackgroundColor = Color.Transparent;
picker.SelectedIndexChanged += Picker_SelectedIndexChanged;
+ picker.Populated += Picker_Populated;
ConfigureComponents();
SetControlActivity();
@@ -75,27 +77,6 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
if (!ReadOnly) Content = picker;
}
- //-------------------------------------------------------------------
- // C o n t r o l E v e n t s
- //-------------------------------------------------------------------
- private void Picker_Focused (object sender, FocusEventArgs e)
- {
- Control_Focused(sender, e);
- }
- //-------------------------------------------------------------------
- private void Picker_Unfocused (object sender, FocusEventArgs e)
- {
- Control_Unfocused(sender, e);
- }
- //-------------------------------------------------------------------
- public event EventHandler SelectedIndexChanged;
- private void Picker_SelectedIndexChanged (object sender, EventArgs e)
- {
- ReadOnlyText = (picker.SelectedItem != null ? picker.SelectedItem.ToString() : "");
- if (ReadOnly) return;
- if (SelectedIndexChanged != null) SelectedIndexChanged.Invoke(sender, e);
- }
-
//-------------------------------------------------------------------
// V i e w E v e n t s
//-------------------------------------------------------------------
@@ -128,6 +109,33 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
base.OnSizeAllocated(width, height);
}
+ //-------------------------------------------------------------------
+ // C o n t r o l E v e n t s
+ //-------------------------------------------------------------------
+ private void Picker_Focused (object sender, FocusEventArgs e)
+ {
+ Control_Focused(sender, e);
+ }
+ //-------------------------------------------------------------------
+ private void Picker_Unfocused (object sender, FocusEventArgs e)
+ {
+ Control_Unfocused(sender, e);
+ }
+ //-------------------------------------------------------------------
+ public event SaxPicker.PopulatedEventHandler Populated;
+ private void Picker_Populated (object sender, SaxPicker.PopulatedEventArgs e)
+ {
+ if (Populated != null) Populated.Invoke(this, e);
+ }
+ //-------------------------------------------------------------------
+ public event EventHandler SelectedIndexChanged;
+ private void Picker_SelectedIndexChanged (object sender, EventArgs e)
+ {
+ ReadOnlyText = (picker.SelectedItem != null ? picker.SelectedItem.ToString() : "");
+ if (ReadOnly) return;
+ if (SelectedIndexChanged != null) SelectedIndexChanged.Invoke(sender, e);
+ }
+
//-------------------------------------------------------------------
}
//=======================================================================
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Codes.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Codes.cs
index 8447303..b420fbd 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Codes.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Codes.cs
@@ -29,6 +29,10 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
get { return (Picker as SlmPicker_Codes).CodeType; }
set { (Picker as SlmPicker_Codes).CodeType = value; }
}
+ public bool ContainsCode (String code)
+ {
+ return Picker.ContainsItemCode(code);
+ }
public String SelectedCode
{
get { return (Picker as SlmPicker_Codes).SelectedCode; }
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Companies.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Companies.cs
index 9839e78..5cddfc2 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Companies.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Controls/SlmPicker_Companies.cs
@@ -33,6 +33,10 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
get { return (Picker as SlmPicker_Companies).SelectedCompanyId; }
set { (Picker as SlmPicker_Companies).SelectedCompanyId = value; }
}
+ public SlmCompany SelectedCompany
+ {
+ get { return (Picker as SlmPicker_Companies).SelectedCompany; }
+ }
//-------------------------------------------------------------------
// Companies.
@@ -49,6 +53,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
//-------------------------------------------------------------------
// Data members.
private Slm.CompanyType companyType = Slm.CompanyType.Unknown;
+ private readonly List companies = new List();
//-------------------------------------------------------------------
// Construction.
@@ -82,6 +87,13 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
base.SelectedItemId = value;
}
}
+ public SlmCompany SelectedCompany
+ {
+ get
+ {
+ return companies.Find(item => item.Id.Equals(SelectedCompanyId));
+ }
+ }
//-------------------------------------------------------------------
// C o m p a n i e s
@@ -107,6 +119,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
// Clear companies.
ClearItems();
+ companies.Clear();
if (companyType == Slm.CompanyType.Unknown) return;
// Refresh companies.
@@ -137,7 +150,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
// Retrieve companies.
SlmAccountMgr_Mobile accountMgr = new SlmAccountMgr_Mobile(SlmGlobals_Mobile.SessionProfile.SessionContext);
- List companies = await accountMgr.GetCompanyList_Mobile(prmCompany, taskData);
+ companies.Clear();
+ companies.AddRange(await accountMgr.GetCompanyList_Mobile(prmCompany, taskData));
taskData.ThrowIfCancellationRequested();
List pickerItems = new List();
diff --git a/SaLogMgrMobCore/Mobile/Core/Forms/Panels/SlmPanel_AssociatedItems.cs b/SaLogMgrMobCore/Mobile/Core/Forms/Panels/SlmPanel_AssociatedItems.cs
index eeb81b7..d66e66a 100644
--- a/SaLogMgrMobCore/Mobile/Core/Forms/Panels/SlmPanel_AssociatedItems.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Forms/Panels/SlmPanel_AssociatedItems.cs
@@ -1,4 +1,7 @@
-using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
+using Sarand.Core.App;
+using Sarand.LogisticsMgr.Mobile.Core.App;
+using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
+using Sarand.LogisticsMgr.Mobile.Core.Utils;
using System;
using System.Collections.Generic;
using System.Text;
@@ -11,26 +14,130 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
{
//-------------------------------------------------------------------
// Definitions.
+ private SlmFrame viewPanel = new SlmFrame();
private SlmStackLayout stackLayout = new SlmStackLayout() { Orientation = StackOrientation.Vertical };
- //private SlmPanel
+ private SlmGrid gridCaption = new SlmGrid();
+ private ImageButton buttonDropdown = new ImageButton();
+ private ImageButton buttonCloseUp = new ImageButton();
+ private SlmLabel labelCaption = new SlmLabel();
+ private ImageButton buttonAddItem = new ImageButton();
+ private SlmPanel panelSummary = new SlmPanel();
+ private SlmPanel panelDetails = new SlmPanel();
//-------------------------------------------------------------------
// Data members.
- public String caption = "";
//-------------------------------------------------------------------
// Construction.
public SlmPanel_AssociatedItems ()
{
+ // Panel view - to allow rounded corners.
+ viewPanel.Padding = new Thickness(0,0,0,12);
+ viewPanel.BackgroundColor = SlmMobile.AssociatedItemsBackgroundColor;
+ viewPanel.CornerRadius = 8;
+ Content = viewPanel;
+
+ // Main layout.
+ stackLayout.Padding = new Thickness(0);
+ viewPanel.Content = stackLayout;
+
+ // Caption grid.
+ gridCaption.Margin = new Thickness(0);
+ gridCaption.Padding = new Thickness(0, 4, 0, 0);
+ gridCaption.HorizontalOptions = LayoutOptions.Center;
+ gridCaption.VerticalOptions = LayoutOptions.Center;
+ gridCaption.RowSpacing = 0;
+ gridCaption.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
+ gridCaption.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
+ gridCaption.ColumnSpacing = 0;
+ gridCaption.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Star });
+ gridCaption.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
+ gridCaption.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Star });
+ gridCaption.BackgroundColor = SlmMobile.AssociatedItemsCaptionBackgroundColor;
+ stackLayout.Children.Add(gridCaption);
+ // Dropdown button.
+ buttonDropdown.HorizontalOptions = LayoutOptions.Start;
+ buttonDropdown.VerticalOptions = LayoutOptions.Center;
+ buttonDropdown.Source = ImageUtils.GetImageFromByteArray(SacsResourceConsole.GetImageResource(SacsResourceConsole.ImageResource.IconShock_Arrow_Down_Purple_72_png));
+ buttonDropdown.BackgroundColor = Color.Transparent;
+ buttonDropdown.Padding = new Thickness(12, 0);
+ buttonDropdown.Clicked += ButtonDropdown_Clicked;
+ gridCaption.Children.Add(buttonDropdown, 0, 0);
+ // Closeup button.
+ buttonCloseUp.HorizontalOptions = LayoutOptions.Start;
+ buttonCloseUp.VerticalOptions = LayoutOptions.Center;
+ buttonCloseUp.Source = ImageUtils.GetImageFromByteArray(SacsResourceConsole.GetImageResource(SacsResourceConsole.ImageResource.IconShock_Arrow_Right_Purple_72_png));
+ buttonCloseUp.BackgroundColor = Color.Transparent;
+ buttonCloseUp.Padding = new Thickness(12, 0);
+ buttonCloseUp.Clicked += ButtonCloseUp_Clicked;
+ gridCaption.Children.Add(buttonCloseUp, 0, 0);
+ // Caption.
+ labelCaption.Margin = new Thickness(0, 0, 0, 8);
+ labelCaption.TextColor = SlmMobile.AssociatedItemsCaptionTextColor;
+ labelCaption.FontSize *= SlmMobile.AssociatedItemsCaptionTextSizeRatio;
+ labelCaption.BackgroundColor = Color.Transparent;
+ gridCaption.Children.Add(labelCaption, 1, 0);
+ // Add Item button.
+ buttonAddItem.HorizontalOptions = LayoutOptions.End;
+ buttonAddItem.VerticalOptions = LayoutOptions.Center;
+ buttonAddItem.Source = ImageUtils.GetImageFromByteArray(SacsResourceConsole.GetImageResource(SacsResourceConsole.ImageResource.IconShock_Add_Green_72_png));
+ buttonAddItem.BackgroundColor = Color.Transparent;
+ buttonAddItem.Padding = new Thickness(12, 0);
+ buttonAddItem.Clicked += ButtonAddItem_Clicked;
+ gridCaption.Children.Add(buttonAddItem, 2, 0);
+
+ // Panels.
+ panelSummary.Padding = new Thickness(4,0);
+ panelSummary.BackgroundColor = Color.Transparent;
+ stackLayout.Children.Add(panelSummary);
+ panelDetails.Padding = new Thickness(4, 0);
+ panelDetails.BackgroundColor = Color.Transparent;
+ stackLayout.Children.Add(panelDetails);
+
+ // Default configuration.
+ CloseUp();
}
//-------------------------------------------------------------------
// Properties.
public String Caption
{
- get { return caption; }
- set { if (caption.Equals(value)) return; caption = value; }
+ get { return labelCaption.Text; }
+ set { if (labelCaption.Text.Equals(value)) return; labelCaption.Text = value; }
}
+ protected SlmPanel SummaryPanel => panelSummary;
+ protected SlmPanel DetailsPanel => panelDetails;
+
+ //-------------------------------------------------------------------
+ // I t e m s T o g g l e
+ //-------------------------------------------------------------------
+ protected void DropDown ()
+ {
+ buttonDropdown.IsVisible = false;
+ buttonCloseUp.IsVisible = true;
+ panelSummary.IsVisible = false;
+ panelDetails.IsVisible = true;
+ }
+ protected void CloseUp ()
+ {
+ buttonDropdown.IsVisible = true;
+ buttonCloseUp.IsVisible = false;
+ panelSummary.IsVisible = true;
+ panelDetails.IsVisible = false;
+ }
+
+ //-------------------------------------------------------------------
+ // P a n e l E v e n t s
+ //-------------------------------------------------------------------
+ private void ButtonDropdown_Clicked (object sender, EventArgs e)
+ {
+ DropDown();
+ }
+ private void ButtonCloseUp_Clicked (object sender, EventArgs e)
+ {
+ CloseUp();
+ }
+ protected virtual void ButtonAddItem_Clicked (object sender, EventArgs e) { }
//-------------------------------------------------------------------
}
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Addresses.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Addresses.cs
index d3c8457..5800064 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Addresses.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Addresses.cs
@@ -296,7 +296,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
ItemId itemId = new ItemId();
if (SysId.IsValid(companyId)) itemId = new ItemId((short)Slm.DataItemType.Company, companyId);
else if (SysId.IsValid(staffMemberId)) itemId = new ItemId((short)Slm.DataItemType.Company, staffMemberId);
- ushort flags = (ushort)itemData.GetIntValue(SlmAddress.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmAddress.Column.Flags);
// Create item.
SlmAddress_Mobile address = new SlmAddress_Mobile(Site, id, itemId, addressType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Companies.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Companies.cs
index 5eaaa1d..a2ebbed 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Companies.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAccountMgr_Mobile_Companies.cs
@@ -298,7 +298,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmCompany.Column.Id);
Slm.CompanyType companyType = EnumUtil.ParseEnum(itemData.GetValue(SlmCompany.Column.CompanyType), Slm.CompanyType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmCompany.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmCompany.Column.Flags);
// Create item.
SlmCompany_Mobile company = new SlmCompany_Mobile(Site, id, companyType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetMovements.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetMovements.cs
index bbf3f33..0d8d144 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetMovements.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetMovements.cs
@@ -516,7 +516,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmAssetMovement.Column.Id);
Slm.AssetItemType assetItemType = EnumUtil.ParseEnum(itemData.GetValue(SlmAssetMovement.Column.AssetItemType), Slm.AssetItemType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmAssetMovement.Column.Id.ToString());
+ ushort flags = (ushort)itemData.GetIntValue(SlmAssetMovement.Column.Flags);
// Create item.
SlmAssetMovement_Mobile assetMovement = new SlmAssetMovement_Mobile(Site, id, assetItemType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetRepairs.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetRepairs.cs
index 8aba472..f407e93 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetRepairs.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile-AssetRepairs.cs
@@ -3,13 +3,16 @@ using Sarand.Core.Base;
using Sarand.Core.Bus;
using Sarand.Core.Data;
using Sarand.Core.Dbas.Base;
+using Sarand.Core.Tasks;
using Sarand.Core.Xml;
using Sarand.LogisticsMgr.Core.App;
using Sarand.LogisticsMgr.Core.Bus;
+using Sarand.LogisticsMgr.Core.WebService;
using Sarand.LogisticsMgr.Mobile.Core.Bus;
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Threading.Tasks;
using System.Xml.Linq;
namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
@@ -34,6 +37,17 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
ClearErrorState();
throw new NotImplementedException();
}
+ public async Task GetAssetRepair_Mobile (SlmAssetRepair.Params prmAssetRepair, SacsTaskData taskData)
+ {
+ ClearErrorState();
+ List companies = new List();
+ String fn = GetType().Name + ".GetAssetRepair_Mobile";
+
+ // Request item data.
+ SlmWebServiceClient.ItemDataResponseData responseData = await webServiceClient.GetItemData(GetAssetRepairRequestConfig(SlmWebServiceRequest.RequestType.Data, taskData.Debug), GetAssetRepairQueryFilter_Mobile(prmAssetRepair), taskData);
+ if (responseData.Item == null) SetErrorState("Asset Repair not present in response.");
+ return GetAssetRepair(responseData.Item);
+ }
//-------------------------------------------------------------------
// Validate Asset Repair.
@@ -44,6 +58,18 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
return true;
}
+ //-------------------------------------------------------------------
+ public async Task StoreAssetRepair_Mobile (XElement itemElement, SacsTaskData taskData)
+ {
+ ClearErrorState();
+
+ // Construct Web Service request.
+ SlmWebServiceRequest.Config configRequest = GetAssetRepairRequestConfig(SlmWebServiceRequest.RequestType.Store, taskData.Debug);
+
+ // Execute web service request
+ return await webServiceClient.StoreItem(configRequest, itemElement, taskData);
+ }
+
//-------------------------------------------------------------------
// Insert Asset Repair.
public override bool InsertAssetRepair (SlmAssetRepair assetRepair, DbUpdateInfo dbUpdateInfo)
@@ -85,6 +111,10 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
//-------------------------------------------------------------------
// Copy data properties to and from database.
private void PopulateTo (XElement assetRepairElement, SlmAssetRepair assetRepair, DbUpdateInfo dbUpdateInfo)
+ {
+ PopulateTo(assetRepairElement, assetRepair.GetData(), dbUpdateInfo);
+ }
+ private void PopulateTo (XElement assetRepairElement, SlmAssetRepair.Data assetRepair, DbUpdateInfo dbUpdateInfo)
{
assetRepairElement.AppendElement("Id", SysId.ToString(assetRepair.Id));
assetRepairElement.AppendElement("Site", SlmSystem.GetSiteCode(assetRepair.Site));
@@ -219,6 +249,12 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
ClearErrorState();
throw new NotImplementedException();
}
+ public async Task GetCAssetRepairCount_Mobile (SlmAssetRepair.Params prmAssetRepair, SacsTaskData taskData)
+ {
+ ClearErrorState();
+ SlmWebServiceClient.ItemCountResponseData responseData = await webServiceClient.GetItemCount(GetAssetRepairRequestConfig(SlmWebServiceRequest.RequestType.Count, taskData.Debug), GetAssetRepairQueryFilter_Mobile(prmAssetRepair), taskData);
+ return responseData.ItemCount;
+ }
//-------------------------------------------------------------------
// Asset Repair list.
@@ -227,6 +263,77 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
List assetRepairs = new List();
throw new NotImplementedException();
}
+ public async Task> GetAssetRepairList_Mobile (SlmAssetRepair.Params prmAssetRepair, SacsTaskData taskData)
+ {
+ ClearErrorState();
+ List assetRepairs = new List();
+ String fn = GetType().Name + ".GetAssetRepairList_Mobile";
+
+ // AssetRepair columns.
+ List columns = new List()
+ {
+ SlmAssetRepair.Column.Id,
+ SlmAssetRepair.Column.AssetMovementId,
+ SlmAssetRepair.Column.RepairNarrative,
+ SlmAssetRepair.Column.RepairInspector,
+ SlmAssetRepair.Column.RepairReference,
+ SlmAssetRepair.Column.RepairRemarks,
+ SlmAssetRepair.Column.EstimateTypeCode,
+ SlmAssetRepair.Column.CurrencyCode,
+ SlmAssetRepair.Column.AuthoriseType,
+ SlmAssetRepair.Column.AuthoriseReference,
+ SlmAssetRepair.Column.AuthoriseRemarks,
+ SlmAssetRepair.Column.EstimatedAt,
+ SlmAssetRepair.Column.AuthorisedAt,
+ SlmAssetRepair.Column.CompletedAt,
+ SlmAssetRepair.Column.CancelledAt,
+ SlmAssetRepair.Column.Notes,
+ SlmAssetRepair.Column.Flags,
+ SlmAssetRepair.Column.Status
+ };
+
+ List itemDataList = await ExecuteAssetRepairQuery_Mobile(columns, prmAssetRepair, taskData);
+ foreach (SlmWebServiceItemData itemData in itemDataList)
+ assetRepairs.Add(GetAssetRepair(itemData));
+ taskData.ThrowIfCancellationRequested();
+
+ if (taskData.Debug) Logger.Debug(fn + " AssetRepairs: " + assetRepairs.Count);
+ return assetRepairs;
+ }
+ private SlmAssetRepair GetAssetRepair (SlmWebServiceItemData itemData)
+ {
+ if (itemData == null) return null;
+ // Item construction properties.
+ SysId id = itemData.GetIdValue(SlmAssetRepair.Column.Id);
+ SysId assetMovementId = itemData.GetIdValue(SlmAssetRepair.Column.AssetMovementId);
+ ushort flags = (ushort)itemData.GetIntValue(SlmAssetRepair.Column.Flags);
+ // Create item.
+ SlmAssetRepair_Mobile assetRepair = new SlmAssetRepair_Mobile(Site, id, assetMovementId, flags);
+ // Populate item properties.
+ foreach (SlmAssetRepair.Column column in EnumUtil.GetValues())
+ {
+ String value = itemData.GetValue(column);
+ switch (column)
+ {
+ case SlmAssetRepair.Column.RepairNarrative: assetRepair.RepairNarrative = value; break;
+ case SlmAssetRepair.Column.RepairInspector: assetRepair.RepairInspector = value; break;
+ case SlmAssetRepair.Column.RepairReference: assetRepair.RepairReference = value; break;
+ case SlmAssetRepair.Column.RepairRemarks: assetRepair.RepairRemarks = value; break;
+ case SlmAssetRepair.Column.EstimateTypeCode: assetRepair.EstimateTypeCode = value; break;
+ case SlmAssetRepair.Column.CurrencyCode: assetRepair.CurrencyCode = value; break;
+ case SlmAssetRepair.Column.AuthoriseType: assetRepair.AuthoriseType = EnumUtil.ParseEnum(value, Slm.AssetRepairAuthoriseType.Unknown); break;
+ case SlmAssetRepair.Column.AuthoriseReference: assetRepair.AuthoriseReference = value; break;
+ case SlmAssetRepair.Column.AuthoriseRemarks: assetRepair.AuthoriseRemarks = value; break;
+ case SlmAssetRepair.Column.EstimatedAt: assetRepair.EstimatedAt = itemData.GetDateTimeValue(column); break;
+ case SlmAssetRepair.Column.AuthorisedAt: assetRepair.AuthorisedAt = itemData.GetDateTimeValue(column); break;
+ case SlmAssetRepair.Column.CompletedAt: assetRepair.CompletedAt = itemData.GetDateTimeValue(column); break;
+ case SlmAssetRepair.Column.CancelledAt: assetRepair.CancelledAt = itemData.GetDateTimeValue(column); break;
+ case SlmAssetRepair.Column.Notes: assetRepair.Notes = value; break;
+ case SlmAssetRepair.Column.Status: assetRepair.Status = SacsSystem.GetStatusForCode(value); break;
+ }
+ }
+ return assetRepair;
+ }
//-------------------------------------------------------------------
// Asset Repair query execution.
@@ -235,6 +342,31 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
ClearErrorState();
throw new NotImplementedException();
}
+ public async Task> ExecuteAssetRepairQuery_Mobile (List assetRepairColumns, SlmAssetRepair.Params prmAssetRepair, SacsTaskData taskData)
+ {
+ ClearErrorState();
+
+ // Columns.
+ List columns = new List();
+ foreach (SlmAssetRepair.Column column in assetRepairColumns)
+ columns.Add(column.ToString());
+
+ SlmWebServiceClient.ItemListResponseData responseData = await webServiceClient.GetItemList(GetAssetRepairRequestConfig(SlmWebServiceRequest.RequestType.List, taskData.Debug), GetAssetRepairQueryFilter_Mobile(prmAssetRepair), columns, taskData);
+ return responseData.Items;
+ }
+
+ //-------------------------------------------------------------------
+ private SlmWebServiceRequest.Config GetAssetRepairRequestConfig (SlmWebServiceRequest.RequestType requestType, bool debug = false)
+ {
+ SlmWebServiceRequest.Config configRequest = new SlmWebServiceRequest.Config();
+ configRequest.DataType = SlmWebServiceRequest.DataType.AssetRepair;
+ configRequest.RequestType = requestType;
+ configRequest.Context.SiteDefinition = SiteDefinition;
+ configRequest.Context.User = User;
+ configRequest.Context.Email = Email;
+ configRequest.Context.Debug = debug;
+ return configRequest;
+ }
//-------------------------------------------------------------------
}
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile.cs
index 3c75c0a..a2a83e9 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmAssetMgr_Mobile.cs
@@ -28,6 +28,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
//-------------------------------------------------------------------
// Properties.
+ private SlmWebServiceDfn.ElementNameData ElementName { get; } = new SlmWebServiceDfn.ElementNameData();
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
public String User { get { return SessionProfile.User; } }
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingCosts.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingCosts.cs
index 1f7a403..d42ece5 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingCosts.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingCosts.cs
@@ -229,7 +229,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmBerthingCost.Column.Id);
SysId berthingId = itemData.GetIdValue(SlmBerthingCost.Column.BerthingId);
- ushort flags = (ushort)itemData.GetIntValue(SlmBerthingCost.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmBerthingCost.Column.Flags);
// Create item.
SlmBerthingCost_Mobile berthingCost = new SlmBerthingCost_Mobile(Site, id, berthingId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingResource.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingResource.cs
index f647c11..9a0b6cb 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingResource.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingResource.cs
@@ -242,7 +242,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmBerthingResource.Column.Id);
SysId berthingId = itemData.GetIdValue(SlmBerthingResource.Column.BerthingId);
Slm.BerthingResourceType berthingResourceType = EnumUtil.ParseEnum(itemData.GetValue(SlmBerthingResource.Column.BerthingResourceType), Slm.BerthingResourceType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmBerthingResource.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmBerthingResource.Column.Flags);
// Create item.
SlmBerthingResource_Mobile berthingResource = new SlmBerthingResource_Mobile(Site, id, berthingId, berthingResourceType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingTasks.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingTasks.cs
index abb8111..fed3f21 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingTasks.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-BerthingTasks.cs
@@ -230,7 +230,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmBerthingTask.Column.Id);
SysId berthingId = itemData.GetIdValue(SlmBerthingTask.Column.BerthingId);
Slm.BerthingTaskType berthingTaskType = EnumUtil.ParseEnum(itemData.GetValue(SlmBerthingTask.Column.BerthingTaskType), Slm.BerthingTaskType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmBerthingTask.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmBerthingTask.Column.Flags);
// Create item.
SlmBerthingTask_Mobile berthingTask = new SlmBerthingTask_Mobile(Site, id, berthingId, berthingTaskType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Berthings.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Berthings.cs
index 865c2d6..7c9620c 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Berthings.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Berthings.cs
@@ -293,7 +293,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmBerthing.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmBerthing.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmBerthing.Column.Flags);
// Create item.
SlmBerthing_Mobile berthing = new SlmBerthing_Mobile(Site, id, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-CruiseBerthings.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-CruiseBerthings.cs
index 98a2227..e8ea582 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-CruiseBerthings.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-CruiseBerthings.cs
@@ -321,7 +321,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmCruiseBerthing.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmCruiseBerthing.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmCruiseBerthing.Column.Flags);
// Create item.
SlmCruiseBerthing_Mobile cruiseBerthing = new SlmCruiseBerthing_Mobile(Site, id, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-DischargeHolds.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-DischargeHolds.cs
index ba09891..25f9b65 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-DischargeHolds.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-DischargeHolds.cs
@@ -235,7 +235,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmDischargeHold.Column.Id);
SysId berthingId = itemData.GetIdValue(SlmDischargeHold.Column.BerthingId);
- ushort flags = (ushort)itemData.GetIntValue(SlmDischargeHold.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmDischargeHold.Column.Flags);
// Create item.
SlmDischargeHold_Mobile dischargeHold = new SlmDischargeHold_Mobile(Site, id, berthingId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Discharges.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Discharges.cs
index 8652e18..887d319 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Discharges.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Discharges.cs
@@ -253,7 +253,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmDischarge.Column.Id);
SysId berthingId = itemData.GetIdValue(SlmDischarge.Column.BerthingId);
- ushort flags = (ushort)itemData.GetIntValue(SlmDischarge.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmDischarge.Column.Flags);
// Create item.
SlmDischarge_Mobile discharge = new SlmDischarge_Mobile(Site, id, berthingId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Vessels.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Vessels.cs
index 75aeb99..56b7aa9 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Vessels.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmBerthingMgr_Mobile-Vessels.cs
@@ -251,7 +251,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmVessel.Column.Id);
Slm.VesselCategory vesselCategory = EnumUtil.ParseEnum(itemData.GetValue(SlmVessel.Column.VesselCategory), Slm.VesselCategory.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmVessel.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmVessel.Column.Flags);
// Create item.
SlmVessel_Mobile vessel = new SlmVessel_Mobile(Site, id, vesselCategory, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ChecklistItems.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ChecklistItems.cs
index 8042aea..6033a84 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ChecklistItems.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ChecklistItems.cs
@@ -239,7 +239,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmChecklistItem.Column.Id);
SysId checklistId = itemData.GetIdValue(SlmChecklistItem.Column.ChecklistId);
- ushort flags = (ushort)itemData.GetIntValue(SlmChecklistItem.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmChecklistItem.Column.Flags);
// Create item.
SlmChecklistItem_Mobile checklistItem = new SlmChecklistItem_Mobile(Site, id, checklistId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-Checklists.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-Checklists.cs
index 2791e95..0d3d555 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-Checklists.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-Checklists.cs
@@ -217,7 +217,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmChecklist.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmChecklist.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmChecklist.Column.Flags);
// Create item.
SlmChecklist_Mobile checklist = new SlmChecklist_Mobile(Site, id, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklistItems.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklistItems.cs
index f49173e..0f0a7d8 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklistItems.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklistItems.cs
@@ -243,7 +243,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmItemChecklistItem.Column.Id);
SysId itemChecklistId = itemData.GetIdValue(SlmItemChecklistItem.Column.ItemChecklistId);
SysId checklistItemId = itemData.GetIdValue(SlmItemChecklistItem.Column.ChecklistItemId);
- ushort flags = (ushort)itemData.GetIntValue(SlmItemChecklistItem.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmItemChecklistItem.Column.Flags);
// Create item.
SlmItemChecklistItem_Mobile itemChecklistItem = new SlmItemChecklistItem_Mobile(Site, id, itemChecklistId, checklistItemId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklists.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklists.cs
index 62a5f72..514f303 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklists.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmChecklistMgr_Mobile-ItemChecklists.cs
@@ -234,7 +234,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId itemId = itemData.GetIdValue(SlmItemChecklist.Column.ItemId);
SysId checklistId = itemData.GetIdValue(SlmItemChecklist.Column.ChecklistId);
Slm.ChecklistItemType itemType = EnumUtil.ParseEnum(itemData.GetValue(SlmItemChecklist.Column.ItemType), Slm.ChecklistItemType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmItemChecklist.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmItemChecklist.Column.Flags);
// Create item.
SlmItemChecklist_Mobile itemChecklist = new SlmItemChecklist_Mobile(Site, id, itemId, checklistId, itemType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-Commodities.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-Commodities.cs
index ccf449d..c2c7545 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-Commodities.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-Commodities.cs
@@ -127,7 +127,6 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
//commodity.Id = new SysId(StringUtil.ToInt(commodityElement.GetChildText("Id")));
commodity.Code = commodityElement.GetChildText("Code");
commodity.Desc = commodityElement.GetChildText("Desc");
- commodity.DescFmt = commodityElement.GetChildText("DescFmt");
commodity.GenesysCode = commodityElement.GetChildText("GenesysCode");
commodity.CustomerId = new SysId(StringUtil.ToInt(commodityElement.GetChildText("CustomerId")));
commodity.CustomerCode = commodityElement.GetChildText("CustomerCode");
@@ -252,7 +251,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmCommodity.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmCommodity.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmCommodity.Column.Flags);
// Create item.
SlmCommodity_Mobile commodity = new SlmCommodity_Mobile(Site, id, flags);
// Populate item properties.
@@ -264,7 +263,6 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
//case SlmCommodity.Column.CommodityCategory: commodity.CommodityCategory; break;
case SlmCommodity.Column.Code: commodity.Code = value; break;
case SlmCommodity.Column.Desc: commodity.Desc= value; break;
- case SlmCommodity.Column.DescFmt: commodity.DescFmt = value; break;
case SlmCommodity.Column.GenesysCode: commodity.GenesysCode = value; break;
case SlmCommodity.Column.CustomerId: commodity.CustomerId = itemData.GetIdValue(column); break;
case SlmCommodity.Column.CustomerCode: commodity.CustomerCode = value; break;
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-CommodityLocations.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-CommodityLocations.cs
index 3c2072e..857f78c 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-CommodityLocations.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-CommodityLocations.cs
@@ -231,7 +231,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmCommodityLocation.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmCommodityLocation.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmCommodityLocation.Column.Flags);
// Create item.
SlmCommodityLocation_Mobile commodityLocation = new SlmCommodityLocation_Mobile(Site, id, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLevels.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLevels.cs
index 9efaee1..f01dbc7 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLevels.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLevels.cs
@@ -240,7 +240,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmStockLevel.Column.Id);
SysId commodityId = itemData.GetIdValue(SlmStockLevel.Column.CommodityId);
Slm.StockLevelType stockLevelType = EnumUtil.ParseEnum(itemData.GetValue(SlmStockLevel.Column.StockLevelType), Slm.StockLevelType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmStockLevel.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStockLevel.Column.Flags);
// Create item.
SlmStockLevel_Mobile stockLevel = new SlmStockLevel_Mobile(Site, id, commodityId, stockLevelType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLoadings.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLoadings.cs
index 08733c5..ac25e37 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLoadings.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLoadings.cs
@@ -224,7 +224,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStockLoading.Column.Id);
SysId locationId = itemData.GetIdValue(SlmStockLoading.Column.LocationId);
- ushort flags = (ushort)itemData.GetIntValue(SlmStockLoading.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStockLoading.Column.Flags);
// Create item.
SlmStockLoading_Mobile stockLoading = new SlmStockLoading_Mobile(Site, id, locationId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLocations.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLocations.cs
index 6819cd4..341c621 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLocations.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockLocations.cs
@@ -230,7 +230,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmStockLocation.Column.Id);
SysId locationIdParent = itemData.GetIdValue(SlmStockLocation.Column.LocationIdParent);
Slm.StockLocationType stockLocationType = EnumUtil.ParseEnum(itemData.GetValue(SlmStockLocation.Column.StockLocationType), Slm.StockLocationType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmStockLocation.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStockLocation.Column.Flags);
// Create item.
SlmStockLocation_Mobile stockLocation = new SlmStockLocation_Mobile(Site, id, locationIdParent, stockLocationType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockMovements.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockMovements.cs
index 89e0d17..b054953 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockMovements.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmCommodityMgr_Mobile-StockMovements.cs
@@ -254,7 +254,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmStockMovement.Column.Id);
SysId commodityId = itemData.GetIdValue(SlmStockMovement.Column.CommodityId);
Slm.StockMovementType stockMovementType = EnumUtil.ParseEnum(itemData.GetValue(SlmStockMovement.Column.StockMovementType), Slm.StockMovementType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmStockMovement.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStockMovement.Column.Flags);
// Create item.
SlmStockMovement_Mobile stockMovement = new SlmStockMovement_Mobile(Site, id, commodityId, stockMovementType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmItemDataMgr_Mobile-DataItemValues.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmItemDataMgr_Mobile-DataItemValues.cs
index 61bb5d5..4e49430 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmItemDataMgr_Mobile-DataItemValues.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmItemDataMgr_Mobile-DataItemValues.cs
@@ -219,7 +219,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
//SysId id = itemData.GetIdValue(SlmDataItemValue.Column.Id);
ItemId itemId = new ItemId();
Slm.ItemValueType valueType = EnumUtil.ParseEnum(itemData.GetValue(SlmDataItemValue.Column.ValueType), Slm.ItemValueType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmDataItemValue.Column.ItemId);
+ ushort flags = (ushort)itemData.GetIntValue(SlmDataItemValue.Column.Flags);
// Create item.
SlmDataItemValue_Mobile dataItemValue = new SlmDataItemValue_Mobile(Site, itemId, valueType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffAllocations.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffAllocations.cs
index c8d85be..26e737f 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffAllocations.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffAllocations.cs
@@ -219,7 +219,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmStaffAllocation.Column.Id);
SysId staffTaskId = itemData.GetIdValue(SlmStaffAllocation.Column.StaffTaskId);
SysId staffMemberId = itemData.GetIdValue(SlmStaffAllocation.Column.StaffMemberId);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffAllocation.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffAllocation.Column.Flags);
// Create item.
SlmStaffAllocation_Mobile staffAllocation = new SlmStaffAllocation_Mobile(Site, id, staffTaskId, staffMemberId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffJobs.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffJobs.cs
index 7fa06f5..1850052 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffJobs.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffJobs.cs
@@ -234,7 +234,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStaffJob.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffJob.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffJob.Column.Flags);
// Create item.
SlmStaffJob_Mobile staffJob = new SlmStaffJob_Mobile(Site, id, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberAvailabilities.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberAvailabilities.cs
index 841629d..11f5040 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberAvailabilities.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberAvailabilities.cs
@@ -218,7 +218,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStaffMemberAvailability.Column.Id);
SysId staffMemberId = itemData.GetIdValue(SlmStaffMemberAvailability.Column.StaffMemberId);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffMemberAvailability.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffMemberAvailability.Column.Flags);
// Create item.
SlmStaffMemberAvailability_Mobile staffMemberAvailability = new SlmStaffMemberAvailability_Mobile(Site, id, staffMemberId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberSkills.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberSkills.cs
index 37483b7..85efe37 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberSkills.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMemberSkills.cs
@@ -217,7 +217,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStaffMemberSkill.Column.Id);
SysId staffMemberId = itemData.GetIdValue(SlmStaffMemberSkill.Column.StaffMemberId);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffMemberSkill.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffMemberSkill.Column.Flags);
// Create item.
SlmStaffMemberSkill_Mobile staffMemberSkill = new SlmStaffMemberSkill_Mobile(Site, id, staffMemberId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMembers.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMembers.cs
index db4f8e7..d409683 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMembers.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffMembers.cs
@@ -259,7 +259,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
taskData.ThrowIfCancellationRequested();
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStaffMember.Column.Id);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffMember.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffMember.Column.Flags);
// Create item.
SlmStaffMember_Mobile staffMember = new SlmStaffMember_Mobile(Site, id, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTaskSkills.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTaskSkills.cs
index cd94c8c..21e5cc5 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTaskSkills.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTaskSkills.cs
@@ -217,7 +217,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStaffTaskSkill.Column.Id);
SysId staffMemberId = itemData.GetIdValue(SlmStaffTaskSkill.Column.StaffTaskId);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffTaskSkill.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffTaskSkill.Column.Flags);
// Create item.
SlmStaffTaskSkill_Mobile staffTaskSkill = new SlmStaffTaskSkill_Mobile(Site, id, staffMemberId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTasks.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTasks.cs
index 1cf3e89..e338cc1 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTasks.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmStaffMgr_Mobile-StaffTasks.cs
@@ -239,7 +239,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmStaffTask.Column.Id);
SysId staffJobId = itemData.GetIdValue(SlmStaffTask.Column.StaffJobId);
- ushort flags = (ushort)itemData.GetIntValue(SlmStaffTask.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmStaffTask.Column.Flags);
// Create item.
SlmStaffTask_Mobile staffTask = new SlmStaffTask_Mobile(Site, id, staffJobId, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Requirements.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Requirements.cs
index bdbd429..707e2c6 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Requirements.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Requirements.cs
@@ -260,7 +260,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
SysId id = itemData.GetIdValue(SlmRequirement.Column.Id);
SysId transId = itemData.GetIdValue(SlmRequirement.Column.TransId);
Slm.RequirementType requirementType = EnumUtil.ParseEnum(itemData.GetValue(SlmRequirement.Column.RequirementType), Slm.RequirementType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmRequirement.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmRequirement.Column.Flags);
// Create item.
SlmRequirement_Mobile requirement = new SlmRequirement_Mobile(Site, id, transId, requirementType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Transactions.cs b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Transactions.cs
index 5a8bb34..d054e53 100644
--- a/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Transactions.cs
+++ b/SaLogMgrMobCore/Mobile/Core/Mgr/SlmTransactionMgr_Mobile-Transactions.cs
@@ -242,7 +242,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
// Item construction properties.
SysId id = itemData.GetIdValue(SlmTransaction.Column.Id);
Slm.TransactionType transactionType = EnumUtil.ParseEnum(itemData.GetValue(SlmTransaction.Column.TransactionType), Slm.TransactionType.Unknown);
- ushort flags = (ushort)itemData.GetIntValue(SlmTransaction.Column.Id);
+ ushort flags = (ushort)itemData.GetIntValue(SlmTransaction.Column.Flags);
// Create item.
SlmTransaction_Mobile transaction = new SlmTransaction_Mobile(Site, id, transactionType, flags);
// Populate item properties.
diff --git a/SaLogMgrMobCore/Mobile/Core/WebService/SlmWebServiceStoreItemHelper.cs b/SaLogMgrMobCore/Mobile/Core/WebService/SlmWebServiceStoreItemHelper.cs
new file mode 100644
index 0000000..474e4a2
--- /dev/null
+++ b/SaLogMgrMobCore/Mobile/Core/WebService/SlmWebServiceStoreItemHelper.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Sarand.LogisticsMgr.Mobile.Core.WebService
+{
+ //=======================================================================
+ public static class SlmWebServiceStoreItemHelper
+ {
+ //-------------------------------------------------------------------
+
+ //-------------------------------------------------------------------
+ }
+ //=======================================================================
+}
diff --git a/SaLogMgrMobCore/SaLogMgrMobCore.csproj b/SaLogMgrMobCore/SaLogMgrMobCore.csproj
index abc63e4..d497beb 100644
--- a/SaLogMgrMobCore/SaLogMgrMobCore.csproj
+++ b/SaLogMgrMobCore/SaLogMgrMobCore.csproj
@@ -6,7 +6,8 @@
-
+
+
@@ -15,8 +16,4 @@
-
-
-
-