STN Asset Movements
This commit is contained in:
@@ -4,6 +4,7 @@ using Sarand.LogisticsMgr.Core.App;
|
||||
using Sarand.LogisticsMgr.Mobile.Core.CodeTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
@@ -27,6 +28,17 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmMobile.Platform MobilePlatform { get; protected set; }
|
||||
public Page CurrentPage
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
MainPage.Navigation.ModalStack.LastOrDefault()
|
||||
?? MainPage.Navigation.NavigationStack.LastOrDefault()
|
||||
?? MainPage;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// W e b S e r v i c e
|
||||
@@ -46,10 +58,10 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
//-------------------------------------------------------------------
|
||||
// P e r s i s t e n t S e s s i o n P r o p e r t i e s
|
||||
//-------------------------------------------------------------------
|
||||
public String DefaultEmailAddress { get; set; }
|
||||
protected static String PropertyName_Context_Site_Code { get; } = "Context-Site-Code";
|
||||
protected static String PropertyName_Context_Site_Url { get; } = "Context-Site-Url";
|
||||
protected static String PropertyName_Context_User { get; } = "Context-User";
|
||||
protected static String PropertyName_Context_Email { get; } = "Context-Email";
|
||||
protected static String PropertyName_Context_EmailAddress { get; } = "Context-Email";
|
||||
public void RestorePersistentSessionProperties ()
|
||||
{
|
||||
SlmSessionProfile_Mobile sessionProfile = SlmGlobals_Mobile.SessionProfile;
|
||||
@@ -57,8 +69,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
// Retrieve all session properties first before populating to session.
|
||||
Object sessionSiteCode = Properties.GetValue(PropertyName_Context_Site_Code, SlmSystem.GetSiteCode(sessionProfile.Site));
|
||||
Object sessionSiteUrl = Properties.GetValue(PropertyName_Context_Site_Url, sessionProfile.SiteDefinition != null ? sessionProfile.SiteDefinition.URL : "");
|
||||
Object sessionUser = Properties.GetValue(PropertyName_Context_User, sessionProfile.User);
|
||||
Object sessionEmail = Properties.GetValue(PropertyName_Context_Email, sessionProfile.Email);
|
||||
Object sessionEmail = Properties.GetValue(PropertyName_Context_EmailAddress, sessionProfile.EmailAddress);
|
||||
// Populate session properties.
|
||||
// Site definition.
|
||||
if (sessionSiteCode != null && sessionSiteUrl != null)
|
||||
@@ -73,8 +84,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
}
|
||||
}
|
||||
// User & Email.
|
||||
if (sessionUser != null) sessionProfile.User = sessionUser.ToString();
|
||||
if (sessionEmail != null) sessionProfile.Email = sessionEmail.ToString();
|
||||
if (sessionEmail != null) DefaultEmailAddress = sessionEmail.ToString();
|
||||
}
|
||||
public void StorePersistentSessionProperties ()
|
||||
{
|
||||
@@ -82,8 +92,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
if (sessionProfile == null) return;
|
||||
Properties[PropertyName_Context_Site_Code] = SlmSystem.GetSiteCode(sessionProfile.Site);
|
||||
Properties[PropertyName_Context_Site_Url] = sessionProfile.SiteDefinition.URL;
|
||||
Properties[PropertyName_Context_User] = sessionProfile.User;
|
||||
Properties[PropertyName_Context_Email] = sessionProfile.Email;
|
||||
Properties[PropertyName_Context_EmailAddress] = sessionProfile.EmailAddress;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using Sarand.LogisticsMgr.Core.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmCommand_Mobile : SlmCommand
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmCommand_Mobile (ExecuteFn executeFn, CanExecuteFn canExecuteFn = null) :
|
||||
base(executeFn, canExecuteFn)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmApplication Application { get { return SlmGlobals_Mobile.Application; } }
|
||||
public SlmMobile.Platform MobilePlatform { get { return Application.MobilePlatform; } }
|
||||
// Session.
|
||||
protected SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
protected Slm.Site Site { get { return SessionProfile.Site; } }
|
||||
// User.
|
||||
protected SlmUserContext_Mobile UserContext { get { return SessionProfile.UserContext_Mobile; } }
|
||||
protected SlmSecurityProfile SecurityProfile { get { return UserContext.SecurityProfile; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -27,21 +27,38 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
// Utilities.
|
||||
public static Random Random { get; } = new Random();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Application.
|
||||
public enum MainView
|
||||
{
|
||||
Unknown = 0,
|
||||
// System.
|
||||
Login,
|
||||
Home,
|
||||
// Bulk.
|
||||
ShipFile,
|
||||
// Containers.
|
||||
AssetMovements
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Localisation.
|
||||
public static CultureInfo CultureInfo => CultureInfo.CurrentCulture;
|
||||
public static TextInfo TextInfo => CultureInfo.TextInfo;
|
||||
public static CultureInfo CultureInfo { get; } = CultureInfo.CurrentCulture;
|
||||
public static TextInfo TextInfo { get; } = CultureInfo.TextInfo;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Application styling.
|
||||
public static double ApplicationBarHeight = 28;
|
||||
public static Color ApplicationBarBackgroundColor = Color.FromHex("#558395");
|
||||
public static Color ApplicationBarTextColor = Color.FromHex("#f8f8f8");
|
||||
public static double ApplicationBarTextSizeRatio = 1.5;
|
||||
public static Color ApplicationBarBorderColor = Color.DarkSlateBlue;
|
||||
public static double ApplicationBarBorderBottom = 1.0;
|
||||
public static Color MenuBorderColor = Color.DarkSlateBlue;
|
||||
public static double MenuBorder = 1.0;
|
||||
public static double ApplicationBarHeight { get; } = 28;
|
||||
public static Color ApplicationBarBackgroundColor { get; } = Color.FromHex("#558395");
|
||||
public static Color ApplicationBarTextColor { get; } = Color.FromHex("#f8f8f8");
|
||||
public static double ApplicationBarTextSizeRatio { get; } = 1.5;
|
||||
public static Color ApplicationBarBorderColor { get; } = Color.DarkSlateBlue;
|
||||
public static double ApplicationBarBorderBottom { get; } = 1.0;
|
||||
// Menu.
|
||||
public static Color MenuBorderColor { get; } = Color.DarkSlateBlue;
|
||||
public static double MenuBorder { get; } = 1.0;
|
||||
public static Color MenuBackgroundColor { get; } = Color.FromHex("#F0F0F0");
|
||||
public static Color MenuHeaderBackgroundColor { get; } = Color.FromHex("#E0E0E0");
|
||||
// Dynamic font sizing.
|
||||
public static double FontSizeRatio
|
||||
{
|
||||
@@ -54,29 +71,29 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
}
|
||||
}
|
||||
// Pages.
|
||||
public static Color PageCaptionBackgroundColor = Color.FromHex("#558395");
|
||||
public static double PageCaptionPaddingHorizontal = 4.0;
|
||||
public static double PageCaptionPaddingVertical = 8.0;
|
||||
public static Color PageCaptionTextColor = Color.FromHex("#f8f8f8");
|
||||
public static double PageCaptionTextSizeRatio = 1.25;
|
||||
public static Color PageBaseColor = Color.FromHex("#c8e8f5");
|
||||
public static Color PageBackgroundColor = Color.FromHex("#e9f6fb");
|
||||
public static double PageBodyPaddingVerticalMin = 4.0;
|
||||
public static double PageBodyPaddingHorizontalMin = 4.0;
|
||||
public static double PageNavigationBorderTopWidth = 0.75;
|
||||
public static double PageNavigationPaddingVertical = 4.0;
|
||||
public static Color PageNavigationBorderColor = Color.FromHex("#808080");
|
||||
public static Color PageNavigationBackgroundColor = Color.FromHex("#e9f6fb");
|
||||
public static Color PageCaptionBackgroundColor { get; } = Color.FromHex("#558395");
|
||||
public static double PageCaptionPaddingHorizontal { get; } = 4.0;
|
||||
public static double PageCaptionPaddingVertical { get; } = 8.0;
|
||||
public static Color PageCaptionTextColor { get; } = Color.FromHex("#f8f8f8");
|
||||
public static double PageCaptionTextSizeRatio { get; } = 1.25;
|
||||
public static Color PageBaseColor { get; } = Color.FromHex("#c8e8f5");
|
||||
public static Color PageBackgroundColor { get; } = Color.FromHex("#e9f6fb");
|
||||
public static double PageBodyPaddingVerticalMin { get; } = 4.0;
|
||||
public static double PageBodyPaddingHorizontalMin { get; } = 4.0;
|
||||
public static double PageNavigationBorderTopWidth { get; } = 0.75;
|
||||
public static double PageNavigationPaddingVertical { get; } = 4.0;
|
||||
public static Color PageNavigationBorderColor { get; } = Color.FromHex("#808080");
|
||||
public static Color PageNavigationBackgroundColor { get; } = Color.FromHex("#e9f6fb");
|
||||
// Controls.
|
||||
public static Color ControlBackgroundColor = Color.FromHex("#f8f8f8");
|
||||
public static Color ControlBorderColor = Color.FromHex("#f8f8f8");
|
||||
public static double ControlBorderWidth = 0.5;
|
||||
public static Color ControlBackgroundColor { get; } = Color.FromHex("#f8f8f8");
|
||||
public static Color ControlBorderColor { get; } = Color.FromHex("#f8f8f8");
|
||||
public static double ControlBorderWidth { get; } = 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");
|
||||
public static Color AssociatedItemsCaptionBackgroundColor { get; } = Color.FromHex("#becee4");
|
||||
public static Color AssociatedItemsCaptionTextColor { get; } = Color.FromHex("#f8f8f8");
|
||||
public static double AssociatedItemsCaptionTextSizeRatio { get; } = 1.2;
|
||||
public static Color AssociatedItemsBackgroundColor { get; } = Color.FromHex("#dbe4f0");
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sarand.Core.App;
|
||||
using Sarand.Core.Base;
|
||||
using Sarand.Core.Bus;
|
||||
using Sarand.Core.Security;
|
||||
using Sarand.LogisticsMgr.Core.App;
|
||||
using Sarand.LogisticsMgr.Core.WebService;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmSecurityProfile_Mobile : SlmSecurityProfile
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Base security profile - for raw User and Computer Security Groups and Rights.
|
||||
protected class SaSecurityProfile_Mobile : SaSecurityProfile
|
||||
{
|
||||
public class GroupData_Mobile : GroupData
|
||||
{
|
||||
public GroupData_Mobile(SlmWebServiceItemData securityGroup)
|
||||
{
|
||||
GroupId = securityGroup.GetIdValue("Id");
|
||||
GroupCode = securityGroup.GetValue("Code");
|
||||
GroupDesc = securityGroup.GetValue("Description");
|
||||
}
|
||||
}
|
||||
public class RightData_Mobile : RightData
|
||||
{
|
||||
public RightData_Mobile (SlmWebServiceItemData securityRight)
|
||||
{
|
||||
RightId = securityRight.GetIdValue("Id");
|
||||
RightCode = securityRight.GetValue("Code");
|
||||
RightDesc = securityRight.GetValue("Description");
|
||||
DataItemId = securityRight.GetIdValue("ItemIdContext");
|
||||
Granted = securityRight.GetBoolValue("Granted");
|
||||
}
|
||||
}
|
||||
public SaSecurityProfile_Mobile (SlmWebServiceItemData securityItem)
|
||||
{
|
||||
// Security item properties.
|
||||
Id = securityItem.GetIdValue("Id");
|
||||
SecurityItemType = EnumUtil.ParseEnum(securityItem.GetValue("ItemType"), SaSecurity.ItemType.Unknown);
|
||||
Code = securityItem.GetValue("Code");
|
||||
EmailAddress= securityItem.GetValue("EmailAddress");
|
||||
Description = securityItem.GetValue("Description");
|
||||
Location = securityItem.GetValue("Location");
|
||||
LastLogin = securityItem.GetDateValue("LastLogin");
|
||||
|
||||
// Security Groups.
|
||||
if (securityItem.ChildItems.ContainsKey("SecurityGroupList"))
|
||||
{
|
||||
foreach (SlmWebServiceItemData securityGroup in securityItem.ChildItems["SecurityGroupList"])
|
||||
{
|
||||
GroupData_Mobile groupData = new GroupData_Mobile(securityGroup);
|
||||
foreach (SlmWebServiceItemData securityRight in securityGroup.ChildItems["SecurityRightList"])
|
||||
groupData.rights.Add(new RightData_Mobile(securityRight));
|
||||
securityGroups.Add(groupData);
|
||||
}
|
||||
}
|
||||
// Security Rights.
|
||||
foreach (SlmWebServiceItemData securityRight in securityItem.ChildItems["SecurityRightList"])
|
||||
securityRights.Add(new RightData_Mobile(securityRight));
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmSecurityProfile_Mobile () : base(false)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Refresh profile.
|
||||
public bool RefreshProfile (SlmSiteDefinition siteDefinition, SlmWebServiceItemData securityItem)
|
||||
{
|
||||
String fn = GetType().Name+".RefreshProfile";
|
||||
ClearErrorState();
|
||||
|
||||
// Session context.
|
||||
SysId previousUserId = UserId;
|
||||
|
||||
// Construct User Security Profile.
|
||||
SaSecurityProfile userProfile = new SaSecurityProfile_Mobile(securityItem);
|
||||
UserId = SysId.InvalidOnNull(userProfile.Id);
|
||||
Logger.Debug(fn + " User: '" + UserDisplayName + "' [Id: " + UserId + "]" + (SysId.IsValid(previousUserId) ? ". Previous UserId: " + SysId.ToString(previousUserId) : ""));
|
||||
RefreshProfile(userProfile, null);
|
||||
return SysId.IsValid(UserId) && SysId.InvalidOnNull(UserId).Equals(SysId.InvalidOnNull(userProfile.Id));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -10,21 +10,23 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
private class SlmSiteDefinition_Mobile : SlmSiteDefinition { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmSessionContext_Mobile(SlmSiteDefinition siteDefinition)
|
||||
protected SlmSessionContext_Mobile (SlmSiteDefinition siteDefinition) : base(0)
|
||||
{
|
||||
if (siteDefinition == null) siteDefinition = new SlmSiteDefinition_Mobile();
|
||||
Site = (siteDefinition != null ? siteDefinition.Site : Slm.Site.Unknown);
|
||||
SiteDefinition = siteDefinition;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmSiteDefinition SiteDefinition { get; private set; }
|
||||
public SlmSiteDefinition SiteDefinition { get; protected set; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Sarand.LogisticsMgr.Core.App;
|
||||
using Sarand.LogisticsMgr.Core.WebService;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@@ -6,57 +7,59 @@ using System.Text;
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmSessionProfile_Mobile
|
||||
public class SlmSessionProfile_Mobile : SlmSessionProfile
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
public class SessionData
|
||||
// Definitions.
|
||||
private class SlmUserContext_Mobile_Internal : SlmUserContext_Mobile
|
||||
{
|
||||
public SlmSessionContext_Mobile SessionContext = new SlmSessionContext_Mobile(null);
|
||||
public String User { get; set; } = "";
|
||||
public String Email { get; set; } = "";
|
||||
internal void SetSiteDefinition (SlmSiteDefinition siteDefinition)
|
||||
{
|
||||
sessionContext_Mobile.SetSiteDefinition(siteDefinition);
|
||||
}
|
||||
// Refresh user.
|
||||
internal void RefreshUser (SlmWebServiceItemData securityItem)
|
||||
{
|
||||
// Populate User details.
|
||||
userData_Mobile.Refresh(securityItem);
|
||||
// Populate Security Profile.
|
||||
SecurityProfile_Mobile.RefreshProfile(SessionContext_Mobile.SiteDefinition, securityItem);
|
||||
}
|
||||
}
|
||||
private readonly SessionData session = new SessionData();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly SlmUserContext_Mobile_Internal userContext_Local;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SlmSessionProfile_Mobile ()
|
||||
{
|
||||
UserContext = (userContext_Local = new SlmUserContext_Mobile_Internal());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmSessionContext_Mobile SessionContext { get { return session.SessionContext; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return session.SessionContext.SiteDefinition; } }
|
||||
public Slm.Site Site { get { return session.SessionContext.Site; } }
|
||||
public String SiteCode { get { return session.SessionContext.SiteCode; } }
|
||||
public String User
|
||||
// Session.
|
||||
public SlmSessionContext_Mobile SessionContext_Mobile { get { return userContext_Local.SessionContext_Mobile; } }
|
||||
public SlmSiteDefinition SiteDefinition
|
||||
{
|
||||
get { return session.User; }
|
||||
set
|
||||
{
|
||||
if (session.User.Equals(value)) return;
|
||||
session.User = value;
|
||||
OnPropertyModified(ModifiedProperty.User);
|
||||
}
|
||||
}
|
||||
public String Email
|
||||
{
|
||||
get { return session.Email; }
|
||||
set
|
||||
{
|
||||
if (session.Email.Equals(value)) return;
|
||||
session.Email = value;
|
||||
OnPropertyModified(ModifiedProperty.Email);
|
||||
}
|
||||
get { return SessionContext_Mobile.SiteDefinition; }
|
||||
protected set { userContext_Local.SetSiteDefinition(value); }
|
||||
}
|
||||
// User.
|
||||
public SlmUserContext_Mobile UserContext_Mobile { get { return userContext_Local; } }
|
||||
public String UserCode { get { return userContext_Local.User.SecurityItemCode; } }
|
||||
public String EmailAddress { get { return userContext_Local.User.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// S i t e
|
||||
// U s e r S e s s i o n
|
||||
//-------------------------------------------------------------------
|
||||
protected void SetSiteDefinition (SlmSiteDefinition siteDefinition)
|
||||
public bool LoginUser (SlmSiteDefinition siteDefinition, SlmWebServiceItemData securityItem)
|
||||
{
|
||||
session.SessionContext = new SlmSessionContext_Mobile(siteDefinition);
|
||||
userContext_Local.RefreshUser(securityItem);
|
||||
SlmGlobals_Mobile.Application.SetSite(siteDefinition);
|
||||
return UserContext.ValidUser && SiteDefinition.Valid;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -65,8 +68,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
public enum ModifiedProperty
|
||||
{
|
||||
Site,
|
||||
User,
|
||||
Email,
|
||||
EmailAddress,
|
||||
}
|
||||
public class PropertyModifiedEventArgs : EventArgs
|
||||
{
|
||||
@@ -76,7 +78,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
public event ModifiedEventHandler PropertyModified;
|
||||
private void OnPropertyModified (ModifiedProperty property)
|
||||
{
|
||||
if (PropertyModified != null) PropertyModified.Invoke(this, new PropertyModifiedEventArgs() { Property = property});
|
||||
if (PropertyModified != null) PropertyModified.Invoke(this, new PropertyModifiedEventArgs() { Property = property });
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,10 @@ namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SlmSiteDefinition () :
|
||||
base(Slm.Site.Unknown, "", "")
|
||||
{
|
||||
}
|
||||
protected SlmSiteDefinition (Slm.Site site, String caption, String url) :
|
||||
base(site, caption, url)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
using Sarand.LogisticsMgr.Core.App;
|
||||
using Sarand.LogisticsMgr.Core.WebService;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmUserContext_Mobile : SlmUserContext
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
protected class UserData_Mobile : UserData
|
||||
{
|
||||
public void Refresh (SlmWebServiceItemData securityItem)
|
||||
{
|
||||
SecurityItemId = securityItem.GetIdValue("Id");
|
||||
SecurityItemCode = securityItem.GetValue("Code");
|
||||
EmailAddress = securityItem.GetValue("EmailAddress");
|
||||
DisplayName = securityItem.GetValue("Description");
|
||||
}
|
||||
}
|
||||
protected class SlmSessionContext_Mobile_Internal : SlmSessionContext_Mobile
|
||||
{
|
||||
public SlmSessionContext_Mobile_Internal () : base(null) { }
|
||||
public void SetSiteDefinition (SlmSiteDefinition siteDefinition)
|
||||
{
|
||||
SiteDefinition = siteDefinition;
|
||||
Site = siteDefinition.Site;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
protected readonly SlmSessionContext_Mobile_Internal sessionContext_Mobile;
|
||||
protected readonly UserData_Mobile userData_Mobile;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction - use derived objects.
|
||||
public SlmUserContext_Mobile ()
|
||||
{
|
||||
SessionContext = (sessionContext_Mobile = new SlmSessionContext_Mobile_Internal());
|
||||
User = (userData_Mobile = new UserData_Mobile());
|
||||
SecurityProfile = (SecurityProfile_Mobile = new SlmSecurityProfile_Mobile());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmSessionContext_Mobile SessionContext_Mobile { get { return sessionContext_Mobile; } }
|
||||
protected SlmSecurityProfile_Mobile SecurityProfile_Mobile { get; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -38,8 +38,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public Slm.Site Site { get { return SessionProfile.Site; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
public override bool DatabaseIsValid { get { return true; } }
|
||||
public override bool CanUpdateDatabase { get { return true; } }
|
||||
public bool Populating { get; private set; } = false;
|
||||
@@ -139,8 +139,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
configRequest.DataType = dataType;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
configRequest.SoapEnvelope = (SlmMobile.Random.Next(2) == 1);
|
||||
configRequest.SoapPrefix = new List<String>() { "", "SOAP", "soap", "S", "s" }[SlmMobile.Random.Next(5)];
|
||||
@@ -151,6 +151,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
private async Task RequestRefreshData (RefreshTaskData refreshTaskData)
|
||||
{
|
||||
String fn = GetType().Name + ".RequestRefreshData";
|
||||
if (!SiteDefinition.Valid) return;
|
||||
try
|
||||
{
|
||||
// Slight delay before refresh (in case of immediate cancellation).
|
||||
@@ -164,10 +165,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
// Wait for all tasks to complete.
|
||||
Task.WaitAll(tasks.ToArray());
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Logger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message + ExceptionUtil.GetStackEntries(exc, 8).Concat("", "\n\t"));
|
||||
}
|
||||
catch (Exception exc) { Logger.Warn(fn + " " + exc.GetLogMessage()); }
|
||||
if (this.refreshTaskData == refreshTaskData) this.refreshTaskData = null;
|
||||
}
|
||||
|
||||
@@ -329,39 +327,43 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
{
|
||||
return codeTypes.Exists(item => item.Code.EqualsCI(codeTypeCode));
|
||||
}
|
||||
public bool CodeTypeMatches (SaCodeType codeType, SaCodeType.Params prmCodeType)
|
||||
{
|
||||
if (prmCodeType.IncludedIds.Count > 0 && !prmCodeType.IncludedIds.Contains(codeType.Id)) return false;
|
||||
if (prmCodeType.ExcludedIds.Count > 0 && prmCodeType.ExcludedIds.Contains(codeType.Id)) return false;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.Code) && !codeType.Code.EqualsCI(prmCodeType.Code)) return false;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.CodePartial) && !codeType.Code.ContainsCI(prmCodeType.CodePartial)) return false;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.Desc) && !codeType.Description.EqualsCI(prmCodeType.Desc)) return false;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.DescPartial) && !codeType.Description.ContainsCI(prmCodeType.DescPartial)) return false;
|
||||
if (prmCodeType.StatusCat == SaCodeType.StatusCat.ActiveOnly && codeType.Status != SaCodeType.CurrentStatus) return false;
|
||||
return true;
|
||||
}
|
||||
public override int GetCodeTypeCount (SaCodeType.Params prmCodeType)
|
||||
{
|
||||
return codeTypes.Count;
|
||||
return GetCodeTypeList(prmCodeType).Count;
|
||||
}
|
||||
public SysId GetCodeTypeId (SaCodeType.Params prmCodeType)
|
||||
{
|
||||
SaCodeType codeType = GetCodeType(prmCodeType);
|
||||
return (codeType != null ? codeType.Id : new SysId());
|
||||
return codeType?.Id ?? new SysId();
|
||||
}
|
||||
public SysId GetCodeTypeId (String codeTypeCode)
|
||||
{
|
||||
SaCodeType codeType = codeTypes.Find(item => item.Code.EqualsCI(codeTypeCode));
|
||||
return (codeType != null ? codeType.Id : new SysId());
|
||||
return codeType?.Id ?? new SysId();
|
||||
}
|
||||
public override SaCodeType GetCodeType (SaCodeType.Params prmCodeType)
|
||||
{
|
||||
foreach (SaCodeType codeType in codeTypes)
|
||||
{
|
||||
if (prmCodeType.IncludedIds.Count > 0 && !prmCodeType.IncludedIds.Contains(codeType.Id)) continue;
|
||||
if (prmCodeType.ExcludedIds.Count > 0 && prmCodeType.ExcludedIds.Contains(codeType.Id)) continue;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.Code) && !codeType.Code.EqualsCI(prmCodeType.Code)) continue;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.CodePartial) && !codeType.Code.ContainsCI(prmCodeType.CodePartial)) continue;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.Desc) && !codeType.Description.EqualsCI(prmCodeType.Desc)) continue;
|
||||
if (!StringUtil.IsEmpty(prmCodeType.DescPartial) && !codeType.Description.ContainsCI(prmCodeType.DescPartial)) continue;
|
||||
if (prmCodeType.StatusCat == SaCodeType.StatusCat.ActiveOnly && codeType.Status != SaCodeType.CurrentStatus) continue;
|
||||
return codeType;
|
||||
}
|
||||
return null;
|
||||
List< SaCodeType> codeTypesMatched = GetCodeTypeList(prmCodeType);
|
||||
return codeTypesMatched.Count == 1 ? codeTypesMatched[0] : null;
|
||||
}
|
||||
public override List<SaCodeType> GetCodeTypeList (SaCodeType.Params prmCodeType)
|
||||
{
|
||||
return new List<SaCodeType>(codeTypes);
|
||||
return codeTypes.FindAll(item => CodeTypeMatches(item, prmCodeType));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Code type list.
|
||||
public override ColumnDfn GetCodeTypeColumnDfn (SaCodeType.Column columnId, string caption = "", int width = 0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -383,7 +385,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Maintain code types - returns true if changes made.
|
||||
// Maintain code types.
|
||||
public override bool MaintainCodeTypes (bool userCanManageCodeTypes, DbUpdateInfo dbUpdateInfo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -396,31 +398,55 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
//*******************************************************************
|
||||
// C o d e s
|
||||
//*******************************************************************
|
||||
// Check whether code exists.
|
||||
public override bool CodeExistsForCodeType (string codeTypeCode, string code, bool activeOnly = true)
|
||||
{
|
||||
SaCode.Params prmCode = new SaCode.Params();
|
||||
prmCode.CodeTypeCodes.Add(codeTypeCode);
|
||||
prmCode.Code = code;
|
||||
prmCode.StatusCat = (activeOnly ? SaCode.StatusCat.ActiveOnly : SaCode.StatusCat.Any);
|
||||
return GetCodeCount(prmCode) == 1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Codes for code type.
|
||||
public override bool CodeTypeHasCodes (string codeTypeCode, bool activeOnly = true)
|
||||
{
|
||||
return (GetCodeListForCodeType(codeTypeCode, activeOnly).Count > 0);
|
||||
return GetCodeCountForCodeType(codeTypeCode, activeOnly) > 0;
|
||||
}
|
||||
public override int GetCodeCountForCodeType (string codeTypeCode, bool activeOnly = true)
|
||||
{
|
||||
return GetCodeListForCodeType(codeTypeCode, activeOnly).Count;
|
||||
}
|
||||
public override List<CodeDesc> GetCodesForCodeType (string codeTypeCode, bool activeOnly = true)
|
||||
{
|
||||
List<CodeDesc> codes = new List<CodeDesc>();
|
||||
foreach (SaCode saCode in GetCodeListForCodeType(codeTypeCode, activeOnly))
|
||||
{
|
||||
codes.Add(saCode.Code, saCode.Description);
|
||||
}
|
||||
return new List<CodeDesc>();
|
||||
}
|
||||
public override SaCode GetCodeForCodeType (string codeTypeCode, string code, bool activeOnly = true)
|
||||
{
|
||||
return GetCodeListForCodeType(codeTypeCode, activeOnly).Find(item => item.Code.EqualsCI(code));
|
||||
}
|
||||
public override List<CodeDesc> GetCodeDescsForCodeType (string codeTypeCode, bool activeOnly = true)
|
||||
{
|
||||
List<CodeDesc> codes = new List<CodeDesc>();
|
||||
foreach (SaCode saCode in GetCodeListForCodeType(codeTypeCode, activeOnly))
|
||||
codes.Add(saCode.Code, saCode.Description);
|
||||
return new List<CodeDesc>();
|
||||
}
|
||||
public override List<SaCode> GetCodeListForCodeType (string codeTypeCode, bool activeOnly = true)
|
||||
{
|
||||
return codeTypeCodes.GetValue(GetCodeTypeId(codeTypeCode), new List<SaCode>()).FindAll(item => !activeOnly || item.Status == SaCode.CurrentStatus);
|
||||
return codeTypeCodes.GetValue(GetCodeTypeId(codeTypeCode), new List<SaCode>()).FindAll(item => !activeOnly || item.Status == SaCode.ActiveStatus);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Code list.
|
||||
public override ColumnDfn GetCodeColumnDfn (SaCode.Column columnId, string caption = "", int width = 0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override DbResultSet ExecuteCodeQuery (List<ColumnDfn> columns, SaCode.Params prm)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override DataValue GetCodeDataValue (ColumnDfn column, NamedValue.Map values)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -452,35 +478,27 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
if (!StringUtil.IsEmpty(prmCode.CodePartial) && !saCode.Code.ContainsCI(prmCode.CodePartial)) continue;
|
||||
if (!StringUtil.IsEmpty(prmCode.Desc) && !saCode.Description.EqualsCI(prmCode.Desc)) continue;
|
||||
if (!StringUtil.IsEmpty(prmCode.DescPartial) && !saCode.Description.ContainsCI(prmCode.DescPartial)) continue;
|
||||
if (prmCode.StatusCat == SaCode.StatusCat.ActiveOnly && saCode.Status != SaCode.CurrentStatus) continue;
|
||||
if (prmCode.StatusCat == SaCode.StatusCat.InactiveOnly && saCode.Status == SaCode.CurrentStatus) continue;
|
||||
if (prmCode.StatusCat == SaCode.StatusCat.ActiveOnly && saCode.Status != SaCode.ActiveStatus) continue;
|
||||
if (prmCode.StatusCat == SaCode.StatusCat.InactiveOnly && saCode.Status == SaCode.ActiveStatus) continue;
|
||||
saCodes.Add(saCode);
|
||||
}
|
||||
}
|
||||
return saCodes;
|
||||
}
|
||||
public override ColumnDfn GetCodeColumnDfn (SaCode.Column columnId, string caption = "", int width = 0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override DbResultSet ExecuteCodeQuery (List<ColumnDfn> columns, SaCode.Params prm)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override DataValue GetCodeDataValue (ColumnDfn column, NamedValue.Map values)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Check whether code exists.
|
||||
public override bool CodeExistsForCodeType (string codeTypeCode, string code, bool activeOnly = true)
|
||||
// Filtered codes.
|
||||
public override Dictionary<string, List<SaCode>> GetCodesByCodeType (SaCode.Params prmCode)
|
||||
{
|
||||
SaCode.Params prmCode = new SaCode.Params();
|
||||
prmCode.CodeTypeCodes.Add(codeTypeCode);
|
||||
prmCode.Code = code;
|
||||
prmCode.StatusCat = (activeOnly ? SaCode.StatusCat.ActiveOnly : SaCode.StatusCat.Any);
|
||||
return GetCodeCount(prmCode) == 1;
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override Task<Dictionary<string, List<SaCode>>> GetCodesByCodeTypeAsync (SaCode.Params prmCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public override Dictionary<string, List<CodeDesc>> GetCodeDescsByCodeType (SaCode.Params prmCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -508,14 +526,6 @@ namespace Sarand.LogisticsMgr.Mobile.Core.CodeTypes
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Get code desc list..
|
||||
public override Dictionary<string, List<CodeDesc>> GetCodeDescList (SaCode.Params prmCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext; } }
|
||||
protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext_Mobile; } }
|
||||
// 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; } }
|
||||
|
||||
@@ -63,6 +63,11 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
get { return entry.Keyboard; }
|
||||
set { entry.Keyboard = value; }
|
||||
}
|
||||
public bool IsPassword
|
||||
{
|
||||
get { return entry.IsPassword; }
|
||||
set { entry.IsPassword = value; }
|
||||
}
|
||||
public String Text
|
||||
{
|
||||
get { return entry.Text; }
|
||||
@@ -72,7 +77,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
//-------------------------------------------------------------------
|
||||
// C o n f i g u r e C o m p o n e n t s
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Control configuration that can b changed dynamically.</summary>
|
||||
/// <summary>Control configuration that can be changed dynamically.</summary>
|
||||
protected override void ConfigureComponents ()
|
||||
{
|
||||
base.ConfigureComponents();
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext; } }
|
||||
protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext_Mobile; } }
|
||||
protected SlmContentView FormBodyView { get { return contentViewBody; } }
|
||||
public bool AddMode { get; protected set; } = true;
|
||||
public bool Changed { get; protected set; } = false;
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
using Sarand.LogisticsMgr.Mobile.Core.App;
|
||||
using Sarand.LogisticsMgr.Mobile.Core.Mgr;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmMainPanel : SlmPanel
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
public new class Config : SlmPanel.Config
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private Config config;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SlmMainPanel ()
|
||||
{
|
||||
this.config = new Config();
|
||||
}
|
||||
protected SlmMainPanel (Config config)
|
||||
{
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// C o n f i g u r e C o m p o n e n t s
|
||||
//-------------------------------------------------------------------
|
||||
protected override void ConfigureComponents ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// C o n t r o l A c t i v i t y
|
||||
//-------------------------------------------------------------------
|
||||
protected override void SetControlActivity ()
|
||||
{
|
||||
}
|
||||
protected override void SetControlsReadOnly ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnParentSet ()
|
||||
{
|
||||
base.OnParentSet();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnPropertyChanging ([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
base.OnPropertyChanging(propertyName);
|
||||
}
|
||||
protected override void OnPropertyChanged ([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
base.OnPropertyChanged(propertyName);
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnChildAdded (Element child)
|
||||
{
|
||||
base.OnChildAdded(child);
|
||||
}
|
||||
protected override void OnChildRemoved (Element child)
|
||||
{
|
||||
base.OnChildRemoved(child);
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnSizeAllocated (double width, double height)
|
||||
{
|
||||
base.OnSizeAllocated(width, height);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
@@ -15,14 +15,23 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
public class Config
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private Config config;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmPanel ()
|
||||
{
|
||||
this.config = new Config();
|
||||
}
|
||||
protected SlmPanel (Config config)
|
||||
{
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -35,6 +44,14 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// D i s p l a y M e s s a g e s
|
||||
//-------------------------------------------------------------------
|
||||
protected Task DisplayAlert (string title, string message, string cancel)
|
||||
{
|
||||
return SlmGlobals_Mobile.Application.CurrentPage.DisplayAlert(title, message, cancel);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// C o n t r o l A c t i v i t y
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Sarand.Core.Mobile.Forms.Layouts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Xamarin.Forms;
|
||||
@@ -6,7 +7,7 @@ using Xamarin.Forms;
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmStackLayout : StackLayout
|
||||
public class SlmStackLayout : SaxStackLayout
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Base
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext; } }
|
||||
protected SlmSessionContext_Mobile SessionContext { get { return SlmGlobals_Mobile.SessionProfile.SessionContext_Mobile; } }
|
||||
// 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; } }
|
||||
|
||||
+1
-4
@@ -153,10 +153,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
|
||||
});
|
||||
codesTaskData = null;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Logger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message + ExceptionUtil.GetStackEntries(exc, 8).Concat("", "\n\t"));
|
||||
}
|
||||
catch (Exception exc) { Logger.Warn(fn + " " + exc.GetLogMessage()); }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
+2
-5
@@ -135,10 +135,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
|
||||
await RefreshCompanies(companiesTaskData);
|
||||
companiesTaskData = null;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Logger.Warn(fn + " " + exc.GetType().Name + ": " + exc.Message + ExceptionUtil.GetStackEntries(exc, 8).Concat("", "\n\t"));
|
||||
}
|
||||
catch (Exception exc) { Logger.Warn(fn + " " + exc.GetLogMessage()); }
|
||||
}, companiesTaskData.CancellationToken);
|
||||
}
|
||||
private async Task RefreshCompanies (SacsTaskData taskData)
|
||||
@@ -149,7 +146,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
|
||||
prmCompany.StatusCat = SlmCompany.StatusCat.Any;
|
||||
|
||||
// Retrieve companies.
|
||||
SlmAccountMgr_Mobile accountMgr = new SlmAccountMgr_Mobile(SlmGlobals_Mobile.SessionProfile.SessionContext);
|
||||
SlmAccountMgr_Mobile accountMgr = new SlmAccountMgr_Mobile(SlmGlobals_Mobile.SessionProfile.SessionContext_Mobile);
|
||||
companies.Clear();
|
||||
companies.AddRange(await accountMgr.GetCompanyList_Mobile(prmCompany, taskData));
|
||||
taskData.ThrowIfCancellationRequested();
|
||||
@@ -0,0 +1,87 @@
|
||||
using Sarand.Core.Base;
|
||||
using Sarand.Core.Bus;
|
||||
using Sarand.Core.CodeTypes;
|
||||
using Sarand.Core.Tasks;
|
||||
using Sarand.LogisticsMgr.Core.App;
|
||||
using Sarand.LogisticsMgr.Mobile.Core.App;
|
||||
using Sarand.LogisticsMgr.Mobile.Core.CodeTypes;
|
||||
using Sarand.LogisticsMgr.Mobile.Core.Forms.Base;
|
||||
using Sarand.LogisticsMgr.Mobile.Core.Mgr;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Controls
|
||||
{
|
||||
//=======================================================================
|
||||
public class SlmPickerView_SiteDefinitions : SlmPickerView
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmPickerView_SiteDefinitions () : base(new SlmPicker_SiteDefinitions()) { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmSiteDefinition SelectedSiteDefinition
|
||||
{
|
||||
get { return (Picker as SlmPicker_SiteDefinitions).SelectedSiteDefinition; }
|
||||
set { (Picker as SlmPicker_SiteDefinitions).SelectedSiteDefinition = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
public class SlmPicker_SiteDefinitions : SlmPicker
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private List<SlmSiteDefinition> sites = SlmGlobals_Mobile.Application.GetSiteDefinitions();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmPicker_SiteDefinitions ()
|
||||
{
|
||||
PopulateSites();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public SlmSiteDefinition SelectedSiteDefinition
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SelectedIndex < 0) return null;
|
||||
return sites.Find(item => item.Caption.EqualsCI(Items[SelectedIndex]));
|
||||
}
|
||||
set
|
||||
{
|
||||
for (int siteIdx = 0; siteIdx < sites.Count; siteIdx++)
|
||||
{
|
||||
SlmSiteDefinition siteDefinition = sites[siteIdx];
|
||||
if (siteDefinition == value)
|
||||
SelectedIndex = siteIdx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P o p u l a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
public void PopulateSites ()
|
||||
{
|
||||
Items.Clear();
|
||||
for (int siteIdx = 0; siteIdx < sites.Count; siteIdx++)
|
||||
{
|
||||
SlmSiteDefinition siteDefinition = sites[siteIdx];
|
||||
Items.Add(siteDefinition.Caption);
|
||||
if (siteDefinition == SlmGlobals_Mobile.SessionProfile.SiteDefinition)
|
||||
SelectedIndex = siteIdx;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Sarand.Core.App;
|
||||
using Sarand.Core.Mobile.Utils;
|
||||
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;
|
||||
@@ -14,6 +14,13 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
public new class Config : SlmPanel.Config
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private Config config;
|
||||
private SlmFrame viewPanel = new SlmFrame();
|
||||
private SlmStackLayout stackLayout = new SlmStackLayout() { Orientation = StackOrientation.Vertical };
|
||||
private SlmGrid gridCaption = new SlmGrid();
|
||||
@@ -24,15 +31,14 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
|
||||
private SlmPanel panelSummary = new SlmPanel();
|
||||
private SlmPanel panelDetails = new SlmPanel();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SlmPanel_AssociatedItems ()
|
||||
public SlmPanel_AssociatedItems (Config config) :
|
||||
base(config)
|
||||
{
|
||||
this.config = config;
|
||||
// Panel view - to allow rounded corners.
|
||||
viewPanel.Padding = new Thickness(0,0,0,12);
|
||||
viewPanel.Padding = new Thickness(0, 0, 0, 12);
|
||||
viewPanel.BackgroundColor = SlmMobile.AssociatedItemsBackgroundColor;
|
||||
viewPanel.CornerRadius = 8;
|
||||
Content = viewPanel;
|
||||
@@ -58,7 +64,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
|
||||
// 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.Source = SacsImageUtils.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;
|
||||
@@ -66,7 +72,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
|
||||
// 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.Source = SacsImageUtils.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;
|
||||
@@ -80,14 +86,14 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
|
||||
// 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.Source = SacsImageUtils.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.Padding = new Thickness(4, 0);
|
||||
panelSummary.BackgroundColor = Color.Transparent;
|
||||
stackLayout.Children.Add(panelSummary);
|
||||
panelDetails.Padding = new Thickness(4, 0);
|
||||
@@ -105,8 +111,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Forms.Panels
|
||||
get { return labelCaption.Text; }
|
||||
set { if (labelCaption.Text.Equals(value)) return; labelCaption.Text = value; }
|
||||
}
|
||||
protected SlmPanel SummaryPanel => panelSummary;
|
||||
protected SlmPanel DetailsPanel => panelDetails;
|
||||
protected SlmPanel SummaryPanel { get { return panelSummary; } }
|
||||
protected SlmPanel DetailsPanel { get { return panelDetails; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I t e m s T o g g l e
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -184,6 +184,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -354,8 +355,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Address;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -357,8 +358,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Company;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -286,6 +286,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -608,8 +609,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.AssetMovement;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,6 +171,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -362,8 +363,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.AssetRepair;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
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; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -285,8 +286,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.BerthingCost;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -301,8 +302,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.BerthingResource;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -282,8 +283,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.BerthingTask;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -362,8 +363,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Berthing;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -199,6 +199,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -406,8 +407,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.CruiseBerthing;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -291,8 +292,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.DischargeHold;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -311,8 +312,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Discharge;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -152,6 +152,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -310,8 +311,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Vessel;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -298,8 +299,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.ChecklistItem;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -270,8 +271,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Checklist;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -304,8 +305,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.ItemChecklistItem;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -288,8 +289,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.ItemChecklist;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -311,8 +312,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Commodity;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -287,8 +288,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.CommodityLocation;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -296,8 +297,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StockLevel;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -277,8 +278,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StockLoading;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -284,8 +285,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StockLocation;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -314,8 +315,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StockMovement;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -271,8 +272,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.DataItemValue;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -272,8 +273,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffAllocation;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -290,8 +291,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffJob;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -270,8 +271,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffMemberAvailability;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -269,8 +270,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffMemberSkill;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -160,6 +160,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -324,8 +325,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffMember;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -269,8 +270,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffTaskSkill;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -295,8 +296,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.StaffTask;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -162,6 +162,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -325,8 +326,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Requirement;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
columnDfn.Caption = caption;
|
||||
if (width > 0)
|
||||
columnDfn.Width = width;
|
||||
columnDfn.DataName = columnId.ToString();
|
||||
return columnDfn;
|
||||
}
|
||||
|
||||
@@ -298,8 +299,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
configRequest.DataType = SlmWebServiceRequest.DataType.Transaction;
|
||||
configRequest.RequestType = requestType;
|
||||
configRequest.Context.SiteDefinition = SiteDefinition;
|
||||
configRequest.Context.User = User;
|
||||
configRequest.Context.Email = Email;
|
||||
configRequest.Context.User = UserCode;
|
||||
configRequest.Context.Email = EmailAddress;
|
||||
configRequest.Context.Debug = debug;
|
||||
return configRequest;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
||||
// Properties.
|
||||
public SlmSessionProfile_Mobile SessionProfile { get { return SlmGlobals_Mobile.SessionProfile; } }
|
||||
public SlmSiteDefinition SiteDefinition { get { return SessionProfile.SiteDefinition; } }
|
||||
public String User { get { return SessionProfile.User; } }
|
||||
public String Email { get { return SessionProfile.Email; } }
|
||||
public String UserCode { get { return SessionProfile.UserCode; } }
|
||||
public String EmailAddress { get { return SessionProfile.EmailAddress; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Sarand.LogisticsMgr.Mobile.Core.Utils
|
||||
{
|
||||
//=======================================================================
|
||||
public static class ImageUtils
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// Method that uses the ImageConverter object in .Net Framework to convert a byte array,
|
||||
/// presumably containing a JPEG or PNG file image, into an ImageSource.
|
||||
/// </summary>
|
||||
public static ImageSource GetImageFromByteArray (byte[] imageAsBytes)
|
||||
{
|
||||
return ImageSource.FromStream(() => new MemoryStream(imageAsBytes));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user