|
|
@@ -233,6 +233,22 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Width = new Unit(120, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
+ {
|
|
|
+ column.Caption = "Bew. NT-Sum.";
|
|
|
+ column.FieldName = "AppendixValueCalculated";
|
|
|
+ column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
+ column.MinWidth = 120;
|
|
|
+ column.Width = new Unit(120, UnitType.Pixel);
|
|
|
+ });
|
|
|
+ s.Columns.Add(column =>
|
|
|
+ {
|
|
|
+ column.Caption = "Pot. NT-Sum.";
|
|
|
+ column.FieldName = "AppendixValueCleared";
|
|
|
+ column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
+ column.MinWidth = 120;
|
|
|
+ column.Width = new Unit(120, UnitType.Pixel);
|
|
|
+ });
|
|
|
+ s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Verh. NT-Sum.";
|
|
|
column.FieldName = "AppendixValueNegotiated";
|
|
|
@@ -249,23 +265,9 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
+ var formattedUserDescription = FormatUserDescriptions(userDescriptions);
|
|
|
|
|
|
- if (userDescriptions != null)
|
|
|
- {
|
|
|
- foreach (var description in userDescriptions)
|
|
|
- {
|
|
|
- var split = description.Split('|');
|
|
|
-
|
|
|
- if (split.Length > 1)
|
|
|
- html.ViewContext.Writer.Write(
|
|
|
- "<span style=\"float: left\">" + split[0] + "</span>" +
|
|
|
- "<span style=\"float: right\">" + split[1] + "</span><br />");
|
|
|
- else
|
|
|
- html.ViewContext.Writer.Write(
|
|
|
- "<span>" + split[0] + "</span><br />");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ html.ViewContext.Writer.Write(formattedUserDescription);
|
|
|
});
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -545,23 +547,9 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
+ var formattedUserDescription = FormatUserDescriptions(userDescriptions);
|
|
|
|
|
|
- if (userDescriptions != null)
|
|
|
- {
|
|
|
- foreach (var description in userDescriptions)
|
|
|
- {
|
|
|
- var split = description.Split('|');
|
|
|
-
|
|
|
- if (split.Length > 1)
|
|
|
- html.ViewContext.Writer.Write(
|
|
|
- "<span style=\"float: left\">" + split[0] + "</span>" +
|
|
|
- "<span style=\"float: right\">" + split[1] + "</span><br />");
|
|
|
- else
|
|
|
- html.ViewContext.Writer.Write(
|
|
|
- "<span>" + split[0] + "</span><br />");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ html.ViewContext.Writer.Write(formattedUserDescription);
|
|
|
});
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1047,23 +1035,9 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
+ var formattedUserDescription = FormatUserDescriptions(userDescriptions);
|
|
|
|
|
|
- if (userDescriptions != null)
|
|
|
- {
|
|
|
- foreach (var description in userDescriptions)
|
|
|
- {
|
|
|
- var split = description.Split('|');
|
|
|
-
|
|
|
- if (split.Length > 1)
|
|
|
- html.ViewContext.Writer.Write(
|
|
|
- "<span style=\"float: left\">" + split[0] + "</span>" +
|
|
|
- "<span style=\"float: right\">" + split[1] + "</span><br />");
|
|
|
- else
|
|
|
- html.ViewContext.Writer.Write(
|
|
|
- "<span>" + split[0] + "</span><br />");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ html.ViewContext.Writer.Write(formattedUserDescription);
|
|
|
});
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1162,6 +1136,14 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
+ {
|
|
|
+ column.Caption = "Offen";
|
|
|
+ column.FieldName = "IsRemaining";
|
|
|
+ column.MinWidth = 40;
|
|
|
+ column.Width = new Unit(50, UnitType.Pixel);
|
|
|
+ column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
+ });
|
|
|
+ s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Bestellsch.-Datum";
|
|
|
column.FieldName = "OrderDate";
|
|
|
@@ -1857,5 +1839,52 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
|
|
|
return s;
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// Formats the UserDescriptions to single string format
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="userDescriptions">The UserDescription (Name and Role).</param>
|
|
|
+ private static string FormatUserDescriptions(List<string> userDescriptions)
|
|
|
+ {
|
|
|
+ if (userDescriptions == null) return null;
|
|
|
+
|
|
|
+ var result = String.Empty;
|
|
|
+ var counter = 0;
|
|
|
+
|
|
|
+ foreach (var description in userDescriptions)
|
|
|
+ {
|
|
|
+ if (counter > 1)
|
|
|
+ {
|
|
|
+ var remainingDescriptions =
|
|
|
+ String.Join(
|
|
|
+ ", ",
|
|
|
+ userDescriptions
|
|
|
+ .Skip(2)
|
|
|
+ .Take(userDescriptions.Count - 2)
|
|
|
+ .Select(u => u.Split('|').Length > 1
|
|
|
+ ? String.Format("{0} {1}", u.Split('|')[0], u.Split('|')[1])
|
|
|
+ : String.Format("{0}", u.Split('|')[0])));
|
|
|
+
|
|
|
+ result += "<a href='#' title='" + remainingDescriptions + "'>...</a>";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var split = description.Split('|');
|
|
|
+
|
|
|
+ if (split.Length > 1)
|
|
|
+ result +=
|
|
|
+ "<span style=\"float: left\">" + split[0] + "</span>" +
|
|
|
+ "<span style=\"float: right\">" + split[1] + "</span><br />";
|
|
|
+ else
|
|
|
+ result +=
|
|
|
+ "<span>" + split[0] + "</span><br />";
|
|
|
+ }
|
|
|
+
|
|
|
+ counter++;
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
}
|