|
@@ -1,6 +1,9 @@
|
|
|
using Comal.Classes;
|
|
|
+using InABox.Clients;
|
|
|
using InABox.Core;
|
|
|
using InABox.DynamicGrid;
|
|
|
+using System;
|
|
|
+using System.Linq;
|
|
|
|
|
|
namespace PRSDesktop
|
|
|
{
|
|
@@ -19,6 +22,16 @@ namespace PRSDesktop
|
|
|
//HiddenColumns.Add(x => x.Delivery.Location.Longitude);
|
|
|
}
|
|
|
|
|
|
+ public override Customer CreateItem()
|
|
|
+ {
|
|
|
+ var item = base.CreateItem();
|
|
|
+ item.CustomerStatus.ID = Client.Query(
|
|
|
+ new Filter<CustomerStatus>(x => x.Default).IsEqualTo(true),
|
|
|
+ Columns.None<CustomerStatus>().Add(x => x.ID))
|
|
|
+ .ToObjects<CustomerStatus>().FirstOrDefault()?.ID ?? Guid.Empty;
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+
|
|
|
protected override void DoReconfigure(DynamicGridOptions options)
|
|
|
{
|
|
|
base.DoReconfigure(options);
|