Esempio n. 1
0
 private void CreationSkuLabel(System.Text.StringBuilder sb, JIT.CPOS.BS.Entity.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>");
 }
Esempio n. 2
0
        private void CreationSkuselectDate(System.Text.StringBuilder sb, JIT.CPOS.BS.Entity.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. 3
0
        private void CreationSkuSelect(System.Text.StringBuilder sb, JIT.CPOS.BS.Entity.SkuPropInfo prop, string type)
        {
            var items = GetPropList(prop.prop_id, type);

            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 + "\" style=\"margin-left:10px;\" >");
            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. 4
0
        private void CreationSkuRadio(System.Text.StringBuilder sb, JIT.CPOS.BS.Entity.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. 5
0
        private string CreationSkuPropDetail(JIT.CPOS.BS.Entity.SkuPropInfo prop, string type)
        {
            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 text\" type=\"text\" id=\"" + prop.prop_id + "\" />");
                sb.Append("<div style='float:left;margin-top:5px;' prop_name=\"" + prop.prop_name + "\" columnindex=\"" +
                          prop.display_index + "\" input_flag=\"text\" sku_prop_id=\"" + prop.prop_id +
                          "\" class=\"itemSku text\" type=\"text\" id=\"" + prop.prop_id + "\" ></div>");
                sb.Append("<script>Ext.onReady(function() { createTextbox(\"" +
                          prop.prop_id + "\", null, \"\"); });</script>");
                break;

            case "textarea":
                sb.Append("<textarea style='float:left;' prop_name=\"" + prop.prop_name + "\" columnindex=\"" +
                          prop.display_index + "\" input_flag=\"text\" sku_prop_id=\"" + prop.prop_id +
                          "\" class=\"itemSku text\" type=\"text\" id=\"" + prop.prop_id + "\" style=\"width:200px;height:100px;margin-top:5px;margin-bottom:5px;\"></textarea>");
                break;

            case "select": CreationSkuSelect(sb, prop, type); 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());
        }