public static bool Equals(EChangedType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public static string GetText(EChangedType type) { if (type == EChangedType.Add) { return("新增"); } if (type == EChangedType.Edit) { return("修改"); } if (type == EChangedType.Delete) { return("删除"); } if (type == EChangedType.None) { return(""); } throw new Exception(); }
public static string GetValue(EChangedType type) { if (type == EChangedType.Add) { return("Add"); } if (type == EChangedType.Edit) { return("Edit"); } if (type == EChangedType.Delete) { return("Delete"); } if (type == EChangedType.None) { return("None"); } throw new Exception(); }
public static bool Equals(string typeStr, EChangedType type) { return(Equals(type, typeStr)); }