/// <summary> /// 判断 GroupByClip 是否为null /// </summary> /// <param name="groupByClip"></param> /// <returns></returns> public static bool IsNullOrEmpty(GroupByClip groupByClip) { if ((null == groupByClip) || string.IsNullOrEmpty(groupByClip.ToString())) { return(true); } return(false); }
/// <summary> /// 比较 /// </summary> /// <param name="groupByClip"></param> /// <returns></returns> public bool Equals(GroupByClip groupByClip) { if (null == groupByClip) { return(false); } return(this.ToString().Equals(groupByClip.ToString())); }
/// <summary> /// 去掉的表前缀 /// </summary> /// <returns></returns> public GroupByClip RemovePrefixTableName() { GroupByClip groupc = new GroupByClip(this.groupByClip); if (string.IsNullOrEmpty(groupc.groupByClip)) { return(groupc); } StringBuilder gstring = new StringBuilder(); string[] fs = groupc.groupByClip.Split(','); foreach (string s in fs) { if (string.IsNullOrEmpty(s)) { continue; } gstring.Append(","); if (s.IndexOf('.') > 0) { gstring.Append(s.Substring(s.IndexOf('.') + 1)); } else { gstring.Append(s); } } if (gstring.Length > 1) { groupc.groupByClip = gstring.ToString().Substring(1); } else { groupc.groupByClip = gstring.ToString(); } return(groupc); }