Esempio n. 1
0
    private void CreationDate(System.Text.StringBuilder sb, cPos.Model.PropInfo prop, string domin, string type)
    {
        var onchangeFunc = "";

        if (type == "short")
        {
            onchangeFunc = "getShortDate(this);";
        }
        sb.Append("<input id=\"" + prop.Prop_Id + "\" type=\"text\" class=\"_prop_detail\" readonly=\"readonly\" onclick=\"Calendar('" + prop.Prop_Id + "');\" ");
        sb.Append("title=\"双击清除日期\" ondblclick=\"this.value='';\" ");
        sb.Append("onchange=\"" + onchangeFunc + "\" />");
    }
Esempio n. 2
0
    private void CreationSelect(System.Text.StringBuilder sb, cPos.Model.PropInfo prop, string domin)
    {
        var items = GetPropList(prop.Prop_Id, domin);

        if (items == null || items.Count == 0)
        {
            return;
        }
        sb.Append("<select class=\"_prop_detail\" id=\"" + prop.Prop_Id + "\" prop_name=\"" + prop.Prop_Name + "\" >");
        foreach (var item in items)
        {
            sb.Append("<option id=\"" + item.Prop_Id + "\" value=\"" + item.Prop_Id + "\">" + item.Prop_Name + "</option>");
        }
        sb.Append("</select>");
    }
Esempio n. 3
0
    private void CreationRadio(System.Text.StringBuilder sb, cPos.Model.PropInfo prop, string domin)
    {
        var items = GetPropList(prop.Prop_Id, domin);

        if (items == null || items.Count == 0)
        {
            return;
        }
        foreach (var item in items)
        {
            sb.Append("<input type=\"radio\" prop_name=\"" + prop.Prop_Name + "\" name=\"" + prop.Prop_Id + "\" class=\"_prop_detail_radio\" PropertyDetailId=\"" + prop.Prop_Id + "\"  id=\"" + item.Prop_Id + "\" />");
            sb.Append("<label for=\"" + item.Prop_Id + "\">" + item.Prop_Name + "</label>");
            sb.Append("&nbsp;&nbsp;");
        }
    }
Esempio n. 4
0
    private string CreationPropDetail(cPos.Model.PropInfo prop, string domin)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        switch (prop.Prop_Input_Flag)
        {
        case "text": sb.Append("<input class=\"_prop_detail\" id=\"" + prop.Prop_Id + "\" type=\"text\" prop_name=\"" + prop.Prop_Name + "\" maxlength=\"" + (prop.Prop_Max_Length == 0?30:prop.Prop_Max_Length) + "\" />"); break;

        case "select": CreationSelect(sb, prop, domin); break;

        case "label": CreationLable(sb, prop, domin); break;

        case "select-date-(yyyy-MM)": CreationDate(sb, prop, domin, "short"); break;

        case "select-date-(yyyy-MM-dd)": CreationDate(sb, prop, domin, "full"); break;

        case "radio": CreationRadio(sb, prop, domin); break;

        default: break;
        }
        return(sb.ToString());
    }
Esempio n. 5
0
    private string CreationProp(cPos.Model.PropInfo prop, string domin)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        var items = GetPropList(prop.Prop_Id, domin);

        if (items == null || items.Count == 0)
        {
            return(sb.ToString());
        }
        foreach (var item in items)
        {
            sb.Append("<tr><td class=\"td_co\">");
            sb.Append(item.Prop_Name + ":");
            sb.Append("</td>");
            sb.Append("<td class=\"td_lp\">");
            sb.Append(CreationPropDetail(item, domin));
            sb.Append("</td>");
            sb.Append("</tr>");
        }
        return(sb.ToString());
    }
Esempio n. 6
0
 private void CreationLable(System.Text.StringBuilder sb, cPos.Model.PropInfo prop, string domin)
 {
     sb.Append("<label prop_name=\"" + prop.Prop_Name + "\" class=\"_prop_detail\" id=\"" + prop.Prop_Id + "\">" + prop.Prop_Name + "</label>");
 }