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); }
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; }