コード例 #1
0
        public static SWBaseTag GetTag(string type)
        {
            if (String.IsNullOrWhiteSpace(type))
            {
                return(null);
            }
            type = type.ToLower();

            SWBaseTag tag = null;

            switch (type)
            {
            case SWInputTextTag.Type:
                tag = new SWInputTextTag();
                break;

            case SWDateTag.Type:
                tag = new SWDateTag();
                break;

            case SWVarTag.Type:
                tag = new SWVarTag();
                break;

            case SWQueryTag.Type:
                tag = new SWQueryTag();
                break;

            case SWSelectTag.Type:
                tag = new SWSelectTag();
                break;

            case SWInputDateTag.Type:
                tag = new SWInputDateTag();
                break;

            case SWInputTimeTag.Type:
                tag = new SWInputTimeTag();
                break;
            }
            return(tag);
        }
コード例 #2
0
        public static SWBaseTag GetTag(string type)
        {
            if (String.IsNullOrWhiteSpace(type)) return null;
            type = type.ToLower();

            SWBaseTag tag = null;
            switch (type)
            {
                case SWInputTextTag.Type:
                    tag = new SWInputTextTag();
                    break;
                case SWDateTag.Type:
                    tag = new SWDateTag();
                    break;
                case SWVarTag.Type:
                    tag = new SWVarTag();
                    break;
                case SWQueryTag.Type:
                    tag = new SWQueryTag();
                    break;
                case SWSelectTag.Type:
                    tag = new SWSelectTag();
                    break;
                case SWInputDateTag.Type:
                    tag = new SWInputDateTag();
                    break;
                case SWInputTimeTag.Type:
                    tag = new SWInputTimeTag();
                    break;
            }
            return tag;
        }