Initial import
This commit is contained in:
parent
0c865416ca
commit
04804b89a9
279 changed files with 12945 additions and 0 deletions
20
SalesCatalog/Model/SelectInput.cs
Normal file
20
SalesCatalog/Model/SelectInput.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace SalesCatalog.Model
|
||||
{
|
||||
public class SelectInput: FormInput
|
||||
{
|
||||
public Option[] Items;
|
||||
public int SelectedIndex;
|
||||
public override string ToHtml ()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder ();
|
||||
foreach (Option opt in Items)
|
||||
sb.Append (opt.ToHtml());
|
||||
return string.Format ("<select id=\"{0}\" name=\"{1}\">{2}</select>\n", Id,Name,sb.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue