yavsc/SalesCatalog/Model/CheckBox.cs

29 lines
451 B
C#
Raw Normal View History

2014-07-16 20:35:03 +02:00
using System;
namespace SalesCatalog.Model
{
public class CheckBox : FormInput
{
public CheckBox ()
{
}
#region implemented abstract members of FormInput
public override string Type {
get {
return "checkbox";
}
}
2014-07-16 20:35:03 +02:00
public bool Value { get; set; }
public override string ToHtml ()
{
return string.Format ("<input type=\"checkbox\" id=\"{0}\" name=\"{1}\" {2}/>", Id,Name,Value?"checked":"");
}
#endregion
2014-07-16 20:35:03 +02:00
}
}