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

        if (type == "short")
        {
            onchangeFunc = "getShortDate(this);";
        }
        sb.Append("<input ");
        sb.Append("columnindex = \"" + prop.display_index + "\" input_flag=\"" + prop.prop_input_flag + "\" sku_prop_id=\"" + prop.prop_id + "\" class=\"itemSku\" ");
        sb.Append("id=\"" + prop.prop_id + "\" type=\"text\" readonly=\"readonly\" onclick=\"Calendar('" + prop.prop_id + "');\" ");
        sb.Append("title=\"双击清除日期\" ondblclick=\"this.value='';\" ");
        sb.Append("onchange=\"" + onchangeFunc + "\" />");
    }
Esempio n. 2
0
    private void CreationSkuSelect(System.Text.StringBuilder sb, cPos.Model.SkuPropInfo prop)
    {
        var items = GetPropList(prop.prop_id, "ITEM");

        if (items == null || items.Count == 0)
        {
            return;
        }
        sb.Append("<select columnindex=\"" + prop.display_index + "\" class=\"itemSku\" input_flag=\"" + prop.prop_input_flag + "\" sku_prop_id=\"" + prop.prop_id + "\"  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 CreationSkuRadio(System.Text.StringBuilder sb, cPos.Model.SkuPropInfo prop)
    {
        var items = GetPropList(prop.prop_id, "ITEM");

        if (items == null || items.Count == 0)
        {
            return;
        }
        foreach (var item in items)
        {
            sb.Append("<input ");
            sb.Append("columnindex = \"" + prop.display_index + "\" input_flag=\"" + prop.prop_input_flag + "\" sku_prop_id=\"" + prop.prop_id + "\" class=\"itemSku\" ");
            sb.Append("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 CreationSkuPropDetail(cPos.Model.SkuPropInfo prop)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        switch (prop.prop_input_flag)
        {
        case "text": sb.Append("<input prop_name=\"" + prop.prop_name + "\" columnindex=\"" + prop.display_index + "\" input_flag=\"text\" sku_prop_id=\"" + prop.prop_id + "\" class=\"itemSku\" type=\"text\" id=\"" + prop.prop_id + "\" />"); break;

        case "select": CreationSkuSelect(sb, prop); break;

        case "label": CreationSkuLabel(sb, prop); break;

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

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

        case "radio": CreationSkuRadio(sb, prop); break;

        default: break;
        }
        return(sb.ToString());
    }
Esempio n. 5
0
 private void CreationSkuLabel(System.Text.StringBuilder sb, cPos.Model.SkuPropInfo prop)
 {
     sb.Append("<label ");
     sb.Append("columnindex = \"" + prop.display_index + "\" input_flag=\"" + prop.prop_input_flag + "\" sku_prop_id=\"" + prop.prop_id + "\" class=\"itemSku\" ");
     sb.Append("prop_name=\"" + prop.prop_name + "\" id=\"" + prop.prop_id + "\">" + prop.prop_name + "</label>");
 }