/// <summary> /// Input /// </summary> /// <param name="Title"></param> /// <param name="Name"></param> /// <param name="Placeholder"></param> /// <param name="Col"></param> /// <param name="Type"></param> /// <returns></returns> public string Input(string Title, string Name, object Attribute = null, int Col = 6) { //<div class="col-sm-6 col-md-4"> // <h4 class="example-title">会员名称</h4> // <input type="text" class="form-control" name="Member_Name" data-bind="value:Member_Name" placeholder="请输入 会员名称" /> //</div> var H4 = PageControl.H4(new Dictionary <string, string> { { "class", "example-title" } }, Title); var _Input_Attribute = new Dictionary <string, string>(); _Input_Attribute.Add("type", "text"); _Input_Attribute.Add("class", "form-control"); _Input_Attribute.Add("name", Name); _Input_Attribute.Add("data-bind", "value:" + Name); _Input_Attribute.Add("placeholder", "请输入 " + Title); if (Attribute != null) { foreach (var item in ObjectToDictionary(Attribute)) { _Input_Attribute[item.Key] = item.Value; } } var Input = PageControl.Input(_Input_Attribute); var _Div_Attribute = new Dictionary <string, string>(); _Div_Attribute.Add("class", "col-sm-" + Col); return(PageControl.Div(_Div_Attribute, H4 + Input)); }
/// <summary> /// Input /// </summary> /// <param name="Title"></param> /// <param name="Attribute"></param> /// <param name="Col"></param> /// <returns></returns> public string Input(string Title, object Attribute, int Col = 6) { //<div class="col-sm-6 col-md-4"> // <h4 class="example-title">会员名称</h4> // <input type="text" class="form-control" name="Member_Name" data-bind="value:Member_Name" placeholder="请输入 会员名称" /> //</div> var H4 = PageControl.H4(new Dictionary <string, string> { { "class", "example-title" } }, Title); var Input = PageControl.Input(ObjectToDictionary(Attribute)); var _Div_Attribute = new Dictionary <string, string>(); _Div_Attribute.Add("class", "col-sm-" + Col); return(PageControl.Div(_Div_Attribute, H4 + Input)); }