v1.1.0.0
This commit is contained in:
@@ -407,6 +407,10 @@ namespace Saxonite.Net.Core.Web.Base.Controllers
|
||||
//-------------------------------------------------------------------
|
||||
public class AjaxResponse_Data : AjaxResponse_Base
|
||||
{
|
||||
// Construction.
|
||||
protected AjaxResponse_Data(SaxModel_Base model)
|
||||
{
|
||||
}
|
||||
// Form data.
|
||||
public class FormControlValue
|
||||
{
|
||||
|
||||
@@ -139,6 +139,41 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Form data - Dates.
|
||||
// Format may depend on locale, but as long as these methods are used consistently,
|
||||
// there should be consistent formatting, display and parsing of date values.
|
||||
public String CalendarDateFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
// JQuery-UI DatePicker date format.
|
||||
// Format:
|
||||
// d Single digit day of month
|
||||
// dd Double digit day of month
|
||||
// D 3 letter day of week abbreviation.
|
||||
// DD Day of week.
|
||||
// m Single digit month.
|
||||
// mm Double digit month.
|
||||
// M 3 letter month abbreviation.
|
||||
// MM Month name.
|
||||
// yy 4 digit year.
|
||||
// Examples:
|
||||
// dd/mm/yy 07/04/2012
|
||||
// dd-M-yy 07-Apr-2012
|
||||
// d-M-yy 7-Apr-2012
|
||||
return "dd-M-yy";
|
||||
}
|
||||
}
|
||||
public String FormatDateForForm(DateTime value)
|
||||
{
|
||||
return DateUtil.Format(value, "dd-MMM-yyyy");
|
||||
}
|
||||
public DateTime ParseDateFromForm(String value)
|
||||
{
|
||||
return DateUtil.ParseExact(value, "dd-MMM-yyyy");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Link URLs.
|
||||
public class LinksData
|
||||
@@ -171,7 +206,7 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
/// <summary>List of Region Types for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> RegionTypesForSelect
|
||||
{
|
||||
get { return new SelectList(RegionTypeCodes, "Code", "Desc"); }
|
||||
get { return new SelectList(RegionTypeCodes.FindAll(item => item.Type != (int)Sax.RegionType.Universe && item.Type != (int)Sax.RegionType.Galaxy), "Code", "Desc"); }
|
||||
}
|
||||
|
||||
/// <summary>List of titles for dropdown.</summary>
|
||||
@@ -221,7 +256,7 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Paging properties.
|
||||
private class DataPaging
|
||||
public class DataPaging
|
||||
{
|
||||
private DbQuery.Paging paging { get; } = new DbQuery.Paging();
|
||||
public void PopulatePagingTo(DbQuery.Paging resultsPaging)
|
||||
@@ -236,7 +271,7 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
public ushort ItemCount { get; set; }
|
||||
public ulong ItemTotal { get; set; }
|
||||
}
|
||||
private DataPaging Paging { get; } = new DataPaging();
|
||||
public DataPaging Paging { get; } = new DataPaging();
|
||||
public bool DataPaged { get { return Paging.IsPaged; } }
|
||||
public uint DataPageNo { get { return Paging.PageNo; } set { Paging.PageNo = value; } }
|
||||
public ushort DataPageLength { get { return Paging.PageLength; } set { Paging.PageLength = value; } }
|
||||
|
||||
Reference in New Issue
Block a user