private SqlVariable GSC(SystemCodeType t, string code) { var sc = SystemCodeManager.GetSystemCode(t, code); if (sc != null) return sc.Variable; else return null; }
/// <summary> /// /// </summary> /// <param name="codeType"></param> public SystemCodeAttribute(SystemCodeType codeType) { CodeType = codeType; }
public static IEnumerable<SystemCode> GetSystemCodesOfType(SystemCodeType type) { return _codes.Where(a => a.CodeType == type); }
private static void AddSystemCode(SystemCodeType codeType, string code, string vpsCode) { code = code.Trim(); vpsCode = vpsCode.Trim(); if (_codes.Any(a => a.CodeType == codeType && a.Code == code)) throw new InvalidOperationException(String.Format("Already contains system code ({0}.{1})", codeType, code)); _codes.Add(new SystemCode(codeType, code, vpsCode)); }
public static SystemCode GetSystemCode(SystemCodeType type, string code) { if (code == null) return null; return _codes.Where(a => a.Code == code && a.CodeType == type).FirstOrDefault(); }