|
|
@@ -13,6 +13,8 @@ using System.Web.UI;
|
|
|
using System.Web.UI.WebControls;
|
|
|
using System.Web.Mvc.Html;
|
|
|
using GreenTree.Nachtragsmanagement.Web.Models.Deviation;
|
|
|
+using GreenTree.Nachtragsmanagement.Core;
|
|
|
+using GreenTree.Nachtragsmanagement.Services.Configuration;
|
|
|
|
|
|
namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
@@ -23,6 +25,11 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
/// </summary>
|
|
|
public static UserContext _userContext = Core.CommonHelper.UserContext();
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Global configuration service
|
|
|
+ /// </summary>
|
|
|
+ public static IConfigurationService _configurationService;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// Creates GridViewSettings for the site gridView
|
|
|
/// </summary>
|
|
|
@@ -41,6 +48,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
s.Settings.ShowFooter = true;
|
|
|
s.Settings.ShowGroupPanel = true;
|
|
|
s.Settings.AutoFilterCondition = AutoFilterCondition.Contains;
|
|
|
+ s.Settings.HorizontalScrollBarMode = ScrollBarMode.Auto;
|
|
|
s.Settings.VerticalScrollBarMode = ScrollBarMode.Auto;
|
|
|
s.Settings.VerticalScrollableHeight =
|
|
|
(html.ViewData["ScrollHeight"] == null || (int)html.ViewData["ScrollHeight"] == -1)
|
|
|
@@ -54,8 +62,6 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
s.SettingsBehavior.AllowHeaderFilter = true;
|
|
|
s.SettingsPager.AlwaysShowPager = true;
|
|
|
s.SettingsResizing.ColumnResizeMode = ColumnResizeMode.Control;
|
|
|
- s.SettingsCookies.Enabled = true;
|
|
|
- s.SettingsCookies.CookiesID = "siteGridStateCookie";
|
|
|
s.SettingsPager.Position = PagerPosition.Bottom;
|
|
|
s.SettingsPager.PageSizeItemSettings.Visible = true;
|
|
|
s.SettingsPager.FirstPageButton.Visible = true;
|
|
|
@@ -127,10 +133,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Kostenstelle";
|
|
|
column.FieldName = "CustomNumber";
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
- column.MinWidth = 100;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
- column.SortIndex = 0;
|
|
|
- column.SortOrder = ColumnSortOrder.Ascending;
|
|
|
+ column.MinWidth = 120;
|
|
|
+ column.Width = new Unit(130, UnitType.Pixel);
|
|
|
column.Settings.SortMode = DevExpress.XtraGrid.ColumnSortMode.Custom;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -138,7 +142,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Bauvorhaben";
|
|
|
column.FieldName = "Description";
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
- column.Width = new Unit(20, UnitType.Percentage);
|
|
|
+ column.MinWidth = 150;
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
@@ -146,8 +151,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.FieldName = "Start";
|
|
|
column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.DateRangePicker;
|
|
|
- column.MinWidth = 110;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.MinWidth = 90;
|
|
|
+ column.Width = new Unit(90, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
@@ -155,16 +160,15 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.FieldName = "End";
|
|
|
column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.DateRangePicker;
|
|
|
- column.MinWidth = 110;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.MinWidth = 90;
|
|
|
+ column.Width = new Unit(90, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Offene VA";
|
|
|
column.FieldName = "DeviationDescription";
|
|
|
- column.Visible = false;
|
|
|
- column.MinWidth = 150;
|
|
|
- column.Width = new Unit(12, UnitType.Percentage);
|
|
|
+ column.MinWidth = 230;
|
|
|
+ column.Width = new Unit(230, UnitType.Pixel);
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var id = Convert.ToInt32(DataBinder.Eval(c.DataItem, "Id"));
|
|
|
@@ -190,22 +194,22 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "VA-Summe";
|
|
|
column.FieldName = "DeviationValue";
|
|
|
column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
- column.Visible = false;
|
|
|
column.MinWidth = 120;
|
|
|
- column.Width = new Unit(10, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(120, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Nachträge";
|
|
|
column.FieldName = "AppendixDescription";
|
|
|
- column.Width = new Unit(10, UnitType.Percentage);
|
|
|
+ column.MinWidth = 130;
|
|
|
+ column.Width = new Unit(130, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Mitarbeiter";
|
|
|
column.FieldName = "UserDescription";
|
|
|
- column.MinWidth = 150;
|
|
|
- column.Width = new Unit(15, UnitType.Percentage);
|
|
|
+ column.MinWidth = 245;
|
|
|
+ column.Width = new Unit(245, UnitType.Pixel);
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
@@ -258,8 +262,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
"<a href=\"#\" onclick='editComment(\"site\"," + id + ",function() { devGridViewSite.PerformCallback(); })'>Bearbeiten</a>");
|
|
|
});
|
|
|
column.MinWidth = 120;
|
|
|
- column.Width = new Unit(15, UnitType.Percentage);
|
|
|
- column.Visible = false;
|
|
|
+ column.Width = new Unit(120, UnitType.Pixel);
|
|
|
});
|
|
|
|
|
|
s.TotalSummary.Add(new ASPxSummaryItem
|
|
|
@@ -294,9 +297,32 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
if (System.Web.HttpContext.Current.Session["SiteGridState"] != null)
|
|
|
e.LayoutData = (string)System.Web.HttpContext.Current.Session["SiteGridState"];
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var userConfigItem = _configurationService.GetUserConfigItemByNameAndUserId("SiteGridLayoutState",
|
|
|
+ _userContext.CurrentUser.Id);
|
|
|
+
|
|
|
+ if (userConfigItem != null)
|
|
|
+ {
|
|
|
+ System.Web.HttpContext.Current.Session["SiteGridState"] = userConfigItem.Value;
|
|
|
+
|
|
|
+ e.LayoutData = (string)System.Web.HttpContext.Current.Session["SiteGridState"];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ ((MVCxGridView)sender).SortBy(((MVCxGridView)sender).Columns[0], ColumnSortOrder.Ascending);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
System.Web.HttpContext.Current.Session["SiteGridState"] = e.LayoutData;
|
|
|
+
|
|
|
+ _configurationService.InsertOrUpdateUserConfigItem(new Core.Domain.Config.UserConfigItem
|
|
|
+ {
|
|
|
+ UserId = _userContext.CurrentUser.Id,
|
|
|
+ Name = "SiteGridLayoutState",
|
|
|
+ Value = e.LayoutData
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
s.PreRender = s.BeforeGetCallbackResult = (sender, e) => {
|
|
|
@@ -359,8 +385,6 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
s.SettingsBehavior.AllowHeaderFilter = true;
|
|
|
s.SettingsPager.AlwaysShowPager = true;
|
|
|
s.SettingsResizing.ColumnResizeMode = ColumnResizeMode.Control;
|
|
|
- s.SettingsCookies.Enabled = true;
|
|
|
- s.SettingsCookies.CookiesID = "deviationGridStateCookie";
|
|
|
s.SettingsPager.Position = PagerPosition.Bottom;
|
|
|
s.SettingsPager.PageSizeItemSettings.Visible = true;
|
|
|
s.SettingsPager.FirstPageButton.Visible = true;
|
|
|
@@ -409,8 +433,6 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Settings.AutoFilterCondition = AutoFilterCondition.Equals;
|
|
|
column.Settings.ShowFilterRowMenu = DefaultBoolean.False;
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
- column.SortIndex = 0;
|
|
|
- column.SortOrder = ColumnSortOrder.Ascending;
|
|
|
column.Settings.SortMode = DevExpress.XtraGrid.ColumnSortMode.Custom;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -426,7 +448,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Baustelle";
|
|
|
column.FieldName = "SiteDescription";
|
|
|
column.MinWidth = 150;
|
|
|
- column.Width = new Unit(10, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -441,8 +463,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
column.Caption = "Mitarbeiter";
|
|
|
column.FieldName = "UserDescription";
|
|
|
- column.MinWidth = 150;
|
|
|
- column.Width = new Unit(15, UnitType.Percentage);
|
|
|
+ column.MinWidth = 250;
|
|
|
+ column.Width = new Unit(250, UnitType.Pixel);
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
@@ -585,8 +607,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
(isLongText ? " " : "<br/>") +
|
|
|
" <a href=\"#\" onclick='editComment(\"deviation\"," + id + ",function() { devGridViewDeviation.PerformCallback(); })'>Bearbeiten</a>");
|
|
|
});
|
|
|
- column.MinWidth = 120;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.MinWidth = 180;
|
|
|
+ column.Width = new Unit(180, UnitType.Pixel);
|
|
|
});
|
|
|
|
|
|
//s.SetDataRowTemplateContent(t =>
|
|
|
@@ -765,9 +787,32 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
if (System.Web.HttpContext.Current.Session["DeviationGridState"] != null)
|
|
|
e.LayoutData = (string)System.Web.HttpContext.Current.Session["DeviationGridState"];
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var userConfigItem = _configurationService.GetUserConfigItemByNameAndUserId("DeviationGridLayoutState",
|
|
|
+ _userContext.CurrentUser.Id);
|
|
|
+
|
|
|
+ if (userConfigItem != null)
|
|
|
+ {
|
|
|
+ System.Web.HttpContext.Current.Session["DeviationGridState"] = userConfigItem.Value;
|
|
|
+
|
|
|
+ e.LayoutData = (string)System.Web.HttpContext.Current.Session["DeviationGridState"];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ ((MVCxGridView)sender).SortBy(((MVCxGridView)sender).Columns[0], ColumnSortOrder.Ascending);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
System.Web.HttpContext.Current.Session["DeviationGridState"] = e.LayoutData;
|
|
|
+
|
|
|
+ _configurationService.InsertOrUpdateUserConfigItem(new Core.Domain.Config.UserConfigItem
|
|
|
+ {
|
|
|
+ UserId = _userContext.CurrentUser.Id,
|
|
|
+ Name = "DeviationGridLayoutState",
|
|
|
+ Value = e.LayoutData
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
s.PreRender = s.BeforeGetCallbackResult = (sender, e) => {
|
|
|
@@ -832,8 +877,6 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
s.SettingsBehavior.AllowHeaderFilter = true;
|
|
|
s.SettingsPager.AlwaysShowPager = true;
|
|
|
s.SettingsResizing.ColumnResizeMode = ColumnResizeMode.Control;
|
|
|
- s.SettingsCookies.Enabled = true;
|
|
|
- s.SettingsCookies.CookiesID = "appendixGridStateCookie";
|
|
|
s.SettingsPager.Position = PagerPosition.Bottom;
|
|
|
s.SettingsPager.PageSizeItemSettings.Visible = true;
|
|
|
s.SettingsPager.FirstPageButton.Visible = true;
|
|
|
@@ -883,15 +926,13 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Settings.ShowFilterRowMenu = DefaultBoolean.False;
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
column.Settings.SortMode = DevExpress.XtraGrid.ColumnSortMode.Custom;
|
|
|
- column.SortIndex = 0;
|
|
|
- column.SortOrder = ColumnSortOrder.Ascending;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Bezeichnung";
|
|
|
column.FieldName = "Description";
|
|
|
column.MinWidth = 200;
|
|
|
- column.Width = new Unit(14, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(200, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
@@ -907,7 +948,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Baustelle";
|
|
|
column.FieldName = "SiteDescription";
|
|
|
column.MinWidth = 150;
|
|
|
- column.Width = new Unit(10, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -922,8 +963,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
column.Caption = "Mitarbeiter";
|
|
|
column.FieldName = "UserDescription";
|
|
|
- column.MinWidth = 150;
|
|
|
- column.Width = new Unit(15, UnitType.Percentage);
|
|
|
+ column.MinWidth = 245;
|
|
|
+ column.Width = new Unit(245, UnitType.Pixel);
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
@@ -951,7 +992,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Einreichung";
|
|
|
column.FieldName = "OfferingDate";
|
|
|
column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
- column.MinWidth = 110;
|
|
|
+ column.MinWidth = 100;
|
|
|
column.Width = new Unit(110, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -959,7 +1000,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Angeb. -Summe";
|
|
|
column.FieldName = "OfferingValue";
|
|
|
column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
- column.MinWidth = 110;
|
|
|
+ column.MinWidth = 100;
|
|
|
column.Width = new Unit(110, UnitType.Pixel);
|
|
|
column.HeaderStyle.Wrap = DefaultBoolean.True;
|
|
|
});
|
|
|
@@ -985,8 +1026,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
column.Caption = "VA";
|
|
|
column.FieldName = "DeviationDescription";
|
|
|
- column.MinWidth = 70;
|
|
|
- column.Width = new Unit(6, UnitType.Percentage);
|
|
|
+ column.MinWidth = 80;
|
|
|
+ column.Width = new Unit(80, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
@@ -1046,7 +1087,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "NT-Kategorien";
|
|
|
column.FieldName = "CategoryValuesDescription";
|
|
|
column.MinWidth = 200;
|
|
|
- column.Width = new Unit(12, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(200, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
@@ -1077,8 +1118,8 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
(isLongText ? " " : "<br/>") +
|
|
|
"<a href=\"#\" onclick='editComment(\"appendix\"," + id + ",function() { devGridViewAppendix.PerformCallback(); })'>Bearbeiten</a>");
|
|
|
});
|
|
|
- column.MinWidth = 250;
|
|
|
- column.Width = new Unit(14, UnitType.Percentage);
|
|
|
+ column.MinWidth = 200;
|
|
|
+ column.Width = new Unit(200, UnitType.Pixel);
|
|
|
});
|
|
|
|
|
|
s.TotalSummary.Add(new ASPxSummaryItem
|
|
|
@@ -1134,9 +1175,32 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
if (System.Web.HttpContext.Current.Session["AppendixGridState"] != null)
|
|
|
e.LayoutData = (string)System.Web.HttpContext.Current.Session["AppendixGridState"];
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var userConfigItem = _configurationService.GetUserConfigItemByNameAndUserId("AppendixGridLayoutState",
|
|
|
+ _userContext.CurrentUser.Id);
|
|
|
+
|
|
|
+ if (userConfigItem != null)
|
|
|
+ {
|
|
|
+ System.Web.HttpContext.Current.Session["AppendixGridState"] = userConfigItem.Value;
|
|
|
+
|
|
|
+ e.LayoutData = (string)System.Web.HttpContext.Current.Session["AppendixGridState"];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ ((MVCxGridView)sender).SortBy(((MVCxGridView)sender).Columns[0], ColumnSortOrder.Ascending);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
System.Web.HttpContext.Current.Session["AppendixGridState"] = e.LayoutData;
|
|
|
+
|
|
|
+ _configurationService.InsertOrUpdateUserConfigItem(new Core.Domain.Config.UserConfigItem
|
|
|
+ {
|
|
|
+ UserId = _userContext.CurrentUser.Id,
|
|
|
+ Name = "AppendixGridLayoutState",
|
|
|
+ Value = e.LayoutData
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
s.PreRender = s.BeforeGetCallbackResult = (sender, e) => {
|
|
|
@@ -1200,8 +1264,6 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
s.SettingsBehavior.AllowHeaderFilter = true;
|
|
|
s.SettingsPager.AlwaysShowPager = true;
|
|
|
s.SettingsResizing.ColumnResizeMode = ColumnResizeMode.Control;
|
|
|
- s.SettingsCookies.Enabled = true;
|
|
|
- s.SettingsCookies.CookiesID = "mailNotificationGridStateCookie";
|
|
|
s.SettingsPager.Position = PagerPosition.Bottom;
|
|
|
s.SettingsPager.PageSizeItemSettings.Visible = true;
|
|
|
s.SettingsPager.FirstPageButton.Visible = true;
|
|
|
@@ -1258,29 +1320,29 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
column.Caption = "Zeitplan";
|
|
|
column.FieldName = "CronExpressionDescription";
|
|
|
- column.MinWidth = 100;
|
|
|
- column.Width = new Unit(20, UnitType.Percentage);
|
|
|
+ column.MinWidth = 200;
|
|
|
+ column.Width = new Unit(200, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Benachrichtigungs-Plugin";
|
|
|
column.FieldName = "NotificationPluginSystemNameDescription";
|
|
|
- column.Width = new Unit(17.5, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(180, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Benachrichtigungs-Job";
|
|
|
column.FieldName = "NotificationJobSystemNameDescription";
|
|
|
column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
- column.MinWidth = 110;
|
|
|
- column.Width = new Unit(17.5, UnitType.Percentage);
|
|
|
+ column.MinWidth = 180;
|
|
|
+ column.Width = new Unit(180, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Mitarbeiter";
|
|
|
column.FieldName = "UserDescriptions";
|
|
|
- column.MinWidth = 200;
|
|
|
- column.Width = new Unit(20, UnitType.Percentage);
|
|
|
+ column.MinWidth = 150;
|
|
|
+ column.Width = new Unit(200, UnitType.Pixel);
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var userDescriptions = DataBinder.Eval(c.DataItem, "UserDescriptions") as List<string>;
|
|
|
@@ -1309,7 +1371,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.FieldName = "NextExecutionTime";
|
|
|
column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
column.MinWidth = 110;
|
|
|
- column.Width = new Unit(15, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
});
|
|
|
|
|
|
s.ClientLayout = (sender, e) =>
|
|
|
@@ -1318,9 +1380,30 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
if (System.Web.HttpContext.Current.Session["MailNotificationsGridState"] != null)
|
|
|
e.LayoutData = (string)System.Web.HttpContext.Current.Session["MailNotificationsGridState"];
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var userConfigItem = _configurationService.GetUserConfigItemByNameAndUserId("MailNotificationsGridLayoutState",
|
|
|
+ _userContext.CurrentUser.Id);
|
|
|
+
|
|
|
+ if (userConfigItem != null)
|
|
|
+ {
|
|
|
+ System.Web.HttpContext.Current.Session["MailNotificationsGridState"] = userConfigItem.Value;
|
|
|
+
|
|
|
+ e.LayoutData = (string)System.Web.HttpContext.Current.Session["MailNotificationsGridState"];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
System.Web.HttpContext.Current.Session["MailNotificationsGridState"] = e.LayoutData;
|
|
|
+
|
|
|
+ _configurationService.InsertOrUpdateUserConfigItem(new Core.Domain.Config.UserConfigItem
|
|
|
+ {
|
|
|
+ UserId = _userContext.CurrentUser.Id,
|
|
|
+ Name = "MailNotificationsGridLayoutState",
|
|
|
+ Value = e.LayoutData
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
s.ClientSideEvents.BeginCallback = "function (s, e) { e.customArgs['scrollHeight'] = [ gridScrollHeight ]; }";
|
|
|
s.ClientSideEvents.ToolbarItemClick = "function (s, e) { onToolbarItemClick(s, e); }";
|
|
|
@@ -1362,8 +1445,6 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
s.SettingsBehavior.AllowHeaderFilter = true;
|
|
|
s.SettingsPager.AlwaysShowPager = true;
|
|
|
s.SettingsResizing.ColumnResizeMode = ColumnResizeMode.Control;
|
|
|
- s.SettingsCookies.Enabled = true;
|
|
|
- s.SettingsCookies.CookiesID = "logGridStateCookie";
|
|
|
s.SettingsPager.Position = PagerPosition.Bottom;
|
|
|
s.SettingsPager.PageSizeItemSettings.Visible = true;
|
|
|
s.SettingsPager.FirstPageButton.Visible = true;
|
|
|
@@ -1415,14 +1496,15 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
});
|
|
|
column.Settings.AllowDragDrop = DefaultBoolean.False;
|
|
|
column.Settings.AllowSort = DefaultBoolean.False;
|
|
|
- column.Width = new Unit(150, UnitType.Pixel);
|
|
|
+ column.MinWidth = 100;
|
|
|
+ column.Width = new Unit(120, UnitType.Pixel);
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
{
|
|
|
column.Caption = "Level";
|
|
|
column.FieldName = "LogLevelDescription";
|
|
|
column.MinWidth = 100;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(100, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1430,7 +1512,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Betreff";
|
|
|
column.FieldName = "ShortMessage";
|
|
|
column.MinWidth = 150;
|
|
|
- column.Width = new Unit(12, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1438,7 +1520,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Nachricht";
|
|
|
column.FieldName = "FullMessage";
|
|
|
column.MinWidth = 200;
|
|
|
- column.Width = new Unit(20, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(200, UnitType.Pixel);
|
|
|
column.SetDataItemTemplateContent(c =>
|
|
|
{
|
|
|
var fullMessage = DataBinder.Eval(c.DataItem, "FullMessage");
|
|
|
@@ -1457,7 +1539,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "IP-Adresse";
|
|
|
column.FieldName = "IpAddress";
|
|
|
column.MinWidth = 130;
|
|
|
- column.Width = new Unit(10, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(130, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1465,7 +1547,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Mitarbeiter";
|
|
|
column.FieldName = "UserDescription";
|
|
|
column.MinWidth = 130;
|
|
|
- column.Width = new Unit(10, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(130, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1473,7 +1555,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Datentyp";
|
|
|
column.FieldName = "EntityType";
|
|
|
column.MinWidth = 100;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(100, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1481,7 +1563,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Daten ID";
|
|
|
column.FieldName = "EntityId";
|
|
|
column.MinWidth = 100;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(100, UnitType.Pixel);
|
|
|
column.SettingsHeaderFilter.Mode = GridHeaderFilterMode.CheckedList;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1489,7 +1571,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Seiten URL";
|
|
|
column.FieldName = "PageUrl";
|
|
|
column.MinWidth = 150;
|
|
|
- column.Width = new Unit(12, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
column.Visible = false;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1497,7 +1579,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.Caption = "Relative URL";
|
|
|
column.FieldName = "ReferrerUrl";
|
|
|
column.MinWidth = 100;
|
|
|
- column.Width = new Unit(8, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(100, UnitType.Pixel);
|
|
|
column.Visible = false;
|
|
|
});
|
|
|
s.Columns.Add(column =>
|
|
|
@@ -1506,7 +1588,7 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
column.FieldName = "CreatedOnLocal";
|
|
|
column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy - HH:mm:ss";
|
|
|
column.MinWidth = 150;
|
|
|
- column.Width = new Unit(12, UnitType.Percentage);
|
|
|
+ column.Width = new Unit(150, UnitType.Pixel);
|
|
|
});
|
|
|
|
|
|
s.ClientLayout = (sender, e) =>
|
|
|
@@ -1515,9 +1597,30 @@ namespace GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
{
|
|
|
if (System.Web.HttpContext.Current.Session["LogGridState"] != null)
|
|
|
e.LayoutData = (string)System.Web.HttpContext.Current.Session["LogGridState"];
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var userConfigItem = _configurationService.GetUserConfigItemByNameAndUserId("LogGridLayoutState",
|
|
|
+ _userContext.CurrentUser.Id);
|
|
|
+
|
|
|
+ if (userConfigItem != null)
|
|
|
+ {
|
|
|
+ System.Web.HttpContext.Current.Session["LogGridState"] = userConfigItem.Value;
|
|
|
+
|
|
|
+ e.LayoutData = (string)System.Web.HttpContext.Current.Session["LogGridState"];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
System.Web.HttpContext.Current.Session["LogGridState"] = e.LayoutData;
|
|
|
+
|
|
|
+ _configurationService.InsertOrUpdateUserConfigItem(new Core.Domain.Config.UserConfigItem
|
|
|
+ {
|
|
|
+ UserId = _userContext.CurrentUser.Id,
|
|
|
+ Name = "LogGridLayoutState",
|
|
|
+ Value = e.LayoutData
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
s.PreRender = s.BeforeGetCallbackResult = (sender, e) => {
|