New style partially complete
This commit is contained in:
@@ -160,5 +160,15 @@ namespace MileageTraker.Web.Utility
|
||||
var i = 0;
|
||||
while (true) yield return i++;
|
||||
}
|
||||
|
||||
public static MvcHtmlString Concat(this MvcHtmlString f, MvcHtmlString s)
|
||||
{
|
||||
return MvcHtmlString.Create(f.ToString() + s);
|
||||
}
|
||||
|
||||
public static MvcHtmlString Concat(this MvcHtmlString f, string s)
|
||||
{
|
||||
return MvcHtmlString.Create(f + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,9 +15,9 @@ namespace MileageTraker.Web.Utility
|
||||
{
|
||||
var today = DateTime.Today;
|
||||
return today.AddMonths(-1).AddDays(-today.Day + 1); // last two months
|
||||
if (today.Day > 10)
|
||||
return today.AddDays(-today.Day); // beginning of this month
|
||||
return today.AddMonths(-1).AddDays(-today.Day); // beginning of previous month
|
||||
//if (today.Day > 10)
|
||||
// return today.AddDays(-today.Day); // beginning of this month
|
||||
//return today.AddMonths(-1).AddDays(-today.Day); // beginning of previous month
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,23 @@ namespace MileageTraker.Web.Utility
|
||||
Text = text;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
||||
public class InputSizeAttribute : Attribute
|
||||
{
|
||||
public string Size { get; private set; }
|
||||
|
||||
public string ClassName { get { return "input-" + Size.ToLower(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Specify width of input element
|
||||
/// </summary>
|
||||
/// <param name="size">mini, small, medium, large, xlarge, xxlarge</param>
|
||||
public InputSizeAttribute(string size)
|
||||
{
|
||||
Size = size;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
||||
public class NoEditLabelAttribute : Attribute
|
||||
|
||||
Reference in New Issue
Block a user