Brought into line with LogMgr.
This commit is contained in:
@@ -15,8 +15,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Bus
|
|||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Construction.
|
// Construction.
|
||||||
public SlmItemChecklist_Mobile (Slm.Site site, SysId id, SysId itemId, SysId checklistId, Slm.ChecklistItemType itemType, ushort flags) :
|
public SlmItemChecklist_Mobile (Slm.Site site, SysId id, ItemId itemId, SysId checklistId, ushort flags) :
|
||||||
base(site, id, itemId, checklistId, itemType)
|
base(site, id, itemId, checklistId)
|
||||||
{
|
{
|
||||||
Flags = flags;
|
Flags = flags;
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Bus
|
|||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// A s s o c i a t e d D a t a
|
// A s s o c i a t e d D a t a
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create ItemChecklist.
|
// Create ItemChecklist.
|
||||||
public override SlmItemChecklist CreateItemChecklist (SysId itemId, SysId checklistId, Slm.ChecklistItemType itemType)
|
public override SlmItemChecklist CreateItemChecklist (ItemId itemId, SysId checklistId)
|
||||||
{
|
{
|
||||||
ClearErrorState();
|
ClearErrorState();
|
||||||
return new SlmItemChecklist_Mobile(Site, null, itemId, checklistId, itemType, 0);
|
return new SlmItemChecklist_Mobile(Site, null, itemId, checklistId, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -98,8 +98,8 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
private void PopulateTo (XElement itemChecklistElement, SlmItemChecklist itemChecklist, DbUpdateInfo dbUpdateInfo)
|
private void PopulateTo (XElement itemChecklistElement, SlmItemChecklist itemChecklist, DbUpdateInfo dbUpdateInfo)
|
||||||
{
|
{
|
||||||
itemChecklistElement.AppendElement("Id", SysId.ToString(itemChecklist.Id));
|
itemChecklistElement.AppendElement("Id", SysId.ToString(itemChecklist.Id));
|
||||||
itemChecklistElement.AppendElement("ItemChecklistType", itemChecklist.ItemType.ToString());
|
itemChecklistElement.AppendElement("ItemType", itemChecklist.ItemId.Type.ToString());
|
||||||
itemChecklistElement.AppendElement("ItemId", SysId.ToString(itemChecklist.ItemId));
|
itemChecklistElement.AppendElement("ItemId", SysId.ToString(itemChecklist.ItemId.Id));
|
||||||
itemChecklistElement.AppendElement("ChecklistId", SysId.ToString(itemChecklist.ChecklistId));
|
itemChecklistElement.AppendElement("ChecklistId", SysId.ToString(itemChecklist.ChecklistId));
|
||||||
itemChecklistElement.AppendElement("Name", itemChecklist.Name);
|
itemChecklistElement.AppendElement("Name", itemChecklist.Name);
|
||||||
itemChecklistElement.AppendElement("Actioned", DateUtil.FormatXmlDateTime(itemChecklist.Actioned));
|
itemChecklistElement.AppendElement("Actioned", DateUtil.FormatXmlDateTime(itemChecklist.Actioned));
|
||||||
@@ -159,7 +159,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
if (prm.ExcludedIds.Count > 0) filter.Add("ExcludedIds", prm.ExcludedIds.Concat(","));
|
if (prm.ExcludedIds.Count > 0) filter.Add("ExcludedIds", prm.ExcludedIds.Concat(","));
|
||||||
|
|
||||||
// Item type:
|
// Item type:
|
||||||
if (prm.ItemType!= 0) filter.Add("ItemType", prm.ItemType.ToString());
|
if (prm.ItemType != 0) filter.Add("ItemType", prm.ItemType.ToString());
|
||||||
|
|
||||||
// Item Id.
|
// Item Id.
|
||||||
if (SysId.IsValid(prm.ItemId)) filter.Add("ItemId", SysId.ToString(prm.ItemId));
|
if (SysId.IsValid(prm.ItemId)) filter.Add("ItemId", SysId.ToString(prm.ItemId));
|
||||||
@@ -167,9 +167,6 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
// Checklist Id.
|
// Checklist Id.
|
||||||
if (SysId.IsValid(prm.ChecklistId)) filter.Add("ChecklistId", SysId.ToString(prm.ChecklistId));
|
if (SysId.IsValid(prm.ChecklistId)) filter.Add("ChecklistId", SysId.ToString(prm.ChecklistId));
|
||||||
|
|
||||||
// Active Only.
|
|
||||||
if (prm.ActiveOnly != false) filter.Add("ActiveOnly", prm.ActiveOnly.ToString());
|
|
||||||
|
|
||||||
// Notes.
|
// Notes.
|
||||||
if (!StringUtil.IsEmpty(prm.NotesPartial)) filter.Add("NotesPartial", prm.NotesPartial);
|
if (!StringUtil.IsEmpty(prm.NotesPartial)) filter.Add("NotesPartial", prm.NotesPartial);
|
||||||
|
|
||||||
@@ -220,7 +217,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
SlmItemChecklist.Column.ItemId,
|
SlmItemChecklist.Column.ItemId,
|
||||||
SlmItemChecklist.Column.ChecklistId,
|
SlmItemChecklist.Column.ChecklistId,
|
||||||
SlmItemChecklist.Column.Name,
|
SlmItemChecklist.Column.Name,
|
||||||
SlmItemChecklist.Column.Actioned,
|
SlmItemChecklist.Column.ActionedOn,
|
||||||
SlmItemChecklist.Column.Notes,
|
SlmItemChecklist.Column.Notes,
|
||||||
SlmItemChecklist.Column.Flags,
|
SlmItemChecklist.Column.Flags,
|
||||||
SlmItemChecklist.Column.Status
|
SlmItemChecklist.Column.Status
|
||||||
@@ -232,12 +229,12 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
taskData.ThrowIfCancellationRequested();
|
taskData.ThrowIfCancellationRequested();
|
||||||
// Item construction properties.
|
// Item construction properties.
|
||||||
SysId id = itemData.GetIdValue(SlmItemChecklist.Column.Id);
|
SysId id = itemData.GetIdValue(SlmItemChecklist.Column.Id);
|
||||||
|
Slm.DataItemType itemType = EnumUtil.ParseEnum(itemData.GetValue(SlmItemChecklist.Column.ItemType),Slm.DataItemType.Unknown);
|
||||||
SysId itemId = itemData.GetIdValue(SlmItemChecklist.Column.ItemId);
|
SysId itemId = itemData.GetIdValue(SlmItemChecklist.Column.ItemId);
|
||||||
SysId checklistId = itemData.GetIdValue(SlmItemChecklist.Column.ChecklistId);
|
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.Flags);
|
ushort flags = (ushort)itemData.GetIntValue(SlmItemChecklist.Column.Flags);
|
||||||
// Create item.
|
// Create item.
|
||||||
SlmItemChecklist_Mobile itemChecklist = new SlmItemChecklist_Mobile(Site, id, itemId, checklistId, itemType, flags);
|
SlmItemChecklist_Mobile itemChecklist = new SlmItemChecklist_Mobile(Site, id, new ItemId((short)itemType, itemId), checklistId, flags);
|
||||||
// Populate item properties.
|
// Populate item properties.
|
||||||
foreach (SlmItemChecklist.Column column in columns)
|
foreach (SlmItemChecklist.Column column in columns)
|
||||||
{
|
{
|
||||||
@@ -248,7 +245,7 @@ namespace Sarand.LogisticsMgr.Mobile.Core.Mgr
|
|||||||
//case SlmItemChecklist.Column.ItemId: itemChecklist.ItemId = itemData.GetIdValue(column); break;
|
//case SlmItemChecklist.Column.ItemId: itemChecklist.ItemId = itemData.GetIdValue(column); break;
|
||||||
//case SlmItemChecklist.Column.ChecklistId: itemChecklist.ChecklistId = itemData.GetIdValue(column); break;
|
//case SlmItemChecklist.Column.ChecklistId: itemChecklist.ChecklistId = itemData.GetIdValue(column); break;
|
||||||
case SlmItemChecklist.Column.Name: itemChecklist.Name = value; break;
|
case SlmItemChecklist.Column.Name: itemChecklist.Name = value; break;
|
||||||
case SlmItemChecklist.Column.Actioned: itemChecklist.Actioned = itemData.GetDateTimeValue(column); break;
|
case SlmItemChecklist.Column.ActionedOn: itemChecklist.Actioned = itemData.GetDateTimeValue(column); break;
|
||||||
case SlmItemChecklist.Column.Notes: itemChecklist.Notes = value; break;
|
case SlmItemChecklist.Column.Notes: itemChecklist.Notes = value; break;
|
||||||
case SlmItemChecklist.Column.Status: itemChecklist.Status = SacsSystem.GetStatusForCode(value); break;
|
case SlmItemChecklist.Column.Status: itemChecklist.Status = SacsSystem.GetStatusForCode(value); break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user