v1.1.4.1
This commit is contained in:
@@ -6,12 +6,14 @@ using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.Controllers;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using Saxonite.Net.Standard.Base.Consoles;
|
||||
using Saxonite.Net.Standard.Base.Mgr;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Saxonite.Net.Core.Web.Base.Models
|
||||
{
|
||||
@@ -38,11 +40,15 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
protected SaxAppConfig AppConfig { get { return App.AppConfig; } }
|
||||
protected SaxSystem_Web System { get { return App.System_Web; } }
|
||||
public String SessionCookieName { get { return App.SessionCookieName; } }
|
||||
public SaxLocaliser Localiser { get; }
|
||||
public bool DebugMode { get { return SaxSystem.DebugMode; } }
|
||||
// Session properties.
|
||||
public SaxSessionData SessionData { get; set; }
|
||||
public SaxSessionContext SessionContext { get { return SessionData?.SessionContext ?? App.SessionContext; } }
|
||||
public DbUpdateInfo DbUpdateInfo { get { return SessionData?.DbUpdateInfo ?? new DbUpdateInfo(null, "", SaxSystem.ComputerName); } }
|
||||
public bool DebugMode { get { return SaxSystem.DebugMode; } }
|
||||
public SaxLocaliser Localiser { get; }
|
||||
// Request properties.
|
||||
public SaxController_Base Controller { get; set; }
|
||||
public CultureInfo SessionCulture { get { return Controller?.SessionCulture ?? CultureInfo.InvariantCulture; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Page configuration.
|
||||
@@ -190,11 +196,11 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
}
|
||||
public String FormatDateForForm(DateTime value)
|
||||
{
|
||||
return DateUtil.Format(value, "dd-MMM-yyyy");
|
||||
return DateUtil.Format(value, "dd-MMM-yyyy", SessionCulture);
|
||||
}
|
||||
public DateTime ParseDateFromForm(String value)
|
||||
{
|
||||
return DateUtil.ParseExact(value, "dd-MMM-yyyy");
|
||||
return DateUtil.ParseExact(value, "dd-MMM-yyyy", SessionCulture);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user