* minor changes (like an [em] BBcode)
* Trying to use OAuth2 Google Login
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SalesCatalog.Model
|
||||
{
|
||||
@ -10,11 +11,17 @@ namespace SalesCatalog.Model
|
||||
/// <value>
|
||||
/// The identifier.
|
||||
/// </value>
|
||||
|
||||
[Required]
|
||||
[StringLength(256)]
|
||||
public string Id { get; set; }
|
||||
private string name=null;
|
||||
|
||||
public abstract string Type { get; }
|
||||
|
||||
private string name=null;
|
||||
|
||||
[StringLength(256)]
|
||||
public string Name { get { return name == null ? Id : name; } set { name = value; } }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,22 +4,33 @@ namespace SalesCatalog.Model
|
||||
{
|
||||
public class TextInput:FormInput
|
||||
{
|
||||
|
||||
#region implemented abstract members of FormInput
|
||||
private string tpe = null;
|
||||
public override string Type {
|
||||
get {
|
||||
return "text";
|
||||
return tpe;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public TextInput ()
|
||||
{
|
||||
tpe = "text";
|
||||
}
|
||||
|
||||
public TextInput (string txt)
|
||||
{
|
||||
tpe = "text";
|
||||
text = txt;
|
||||
}
|
||||
|
||||
public TextInput (string type, string txt)
|
||||
{
|
||||
tpe = type;
|
||||
text = txt;
|
||||
}
|
||||
|
||||
string text = null;
|
||||
|
||||
|
||||
@ -27,10 +38,12 @@ namespace SalesCatalog.Model
|
||||
{
|
||||
return t.text;
|
||||
}
|
||||
|
||||
public static implicit operator TextInput(string t)
|
||||
{
|
||||
return new TextInput(t);
|
||||
}
|
||||
|
||||
public string DefaultValue {
|
||||
get {
|
||||
return text;
|
||||
|
Reference in New Issue
Block a user