|
@@ -11,6 +11,7 @@ using Comal.Classes;
|
|
|
using InABox.Clients;
|
|
|
using InABox.Configuration;
|
|
|
using InABox.Core;
|
|
|
+using InABox.DynamicGrid;
|
|
|
using InABox.WPF;
|
|
|
using Syncfusion.SfSkinManager;
|
|
|
using Syncfusion.UI.Xaml.Scheduler;
|
|
@@ -1094,11 +1095,11 @@ namespace PRSDesktop
|
|
|
var comps = emp.Name.Split(' ');
|
|
|
var display = emp.Name;
|
|
|
if (colwidth < 75)
|
|
|
- display = string.Format("{0}{1}", comps.First().Substring(0, 1),
|
|
|
- comps.Length > 1 ? comps.Skip(1).First().Substring(0, 1).ToUpper() : "");
|
|
|
+ display = string.Format("{0}{1}", comps[0].Length > 0 ? comps[0][..1] : "",
|
|
|
+ comps.Length > 1 ? comps.Skip(1).First()[..1].ToUpper() : "");
|
|
|
else if (colwidth < 150)
|
|
|
display = string.Format("{0} {1}", comps.First(),
|
|
|
- comps.Length > 1 ? comps.Skip(1).First().Substring(0, 1).ToUpper() : "");
|
|
|
+ comps.Length > 1 ? comps.Skip(1).First()[..1].ToUpper() : "");
|
|
|
resource.Name = display;
|
|
|
}
|
|
|
}
|
|
@@ -1125,10 +1126,9 @@ namespace PRSDesktop
|
|
|
var comps = emp.Name.Split(' ');
|
|
|
var display = emp.Name;
|
|
|
if (colwidth < 75)
|
|
|
- display = string.Format("{0}{1}", comps.First().Substring(0, 1),
|
|
|
- comps.Length > 1 ? comps.Skip(1).First().Substring(0, 1).ToUpper() : "");
|
|
|
+ display = CoreUtils.Codify(emp.Name);
|
|
|
else if (colwidth < 150)
|
|
|
- display = string.Format("{0} {1}", comps.First(), comps.Length > 1 ? comps.Skip(1).First().Substring(0, 1).ToUpper() : "");
|
|
|
+ display = string.Format("{0} {1}", comps.Length > 0 ? comps.First() : "", comps.Length > 1 ? comps.Skip(1).First().Substring(0, 1).ToUpper() : "");
|
|
|
resources.Add(new SchedulerResource { Name = display, Id = emp.ID.ToString() });
|
|
|
}
|
|
|
|
|
@@ -1322,9 +1322,13 @@ namespace PRSDesktop
|
|
|
MessageBox.Show("Please select an entry first!");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- var ass = new Client<Assignment>().Load(new Filter<Assignment>(x => x.ID).IsEqualTo(model.ID)).FirstOrDefault();
|
|
|
- if (CheckGrid(ref ag).EditItems(new[] { ass }))
|
|
|
+
|
|
|
+ var grid = CheckGrid(ref ag);
|
|
|
+
|
|
|
+
|
|
|
+ var ass = new Client<Assignment>().Query(new Filter<Assignment>(x => x.ID).IsEqualTo(model.ID), grid.LoadEditorColumns())
|
|
|
+ .ToObjects<Assignment>().FirstOrDefault();
|
|
|
+ if (grid.EditItems(new[] { ass }))
|
|
|
{
|
|
|
ItemChanged?.Invoke(this, new CalendarDataDataEventArgs<Assignment>(ass));
|
|
|
Refresh();
|