public static ListItem GetListItem(EWriteBackMethod type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(EWriteBackMethod 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(EWriteBackMethod type) { if (type == EWriteBackMethod.None) { return("不回复信息"); } if (type == EWriteBackMethod.ByWriteBackField) { return("直接回复信息"); } if (type == EWriteBackMethod.ByEmail) { return("通过邮件回复信息"); } if (type == EWriteBackMethod.All) { return("同时使用两种回复方式"); } throw new Exception(); }
public static string GetValue(EWriteBackMethod type) { if (type == EWriteBackMethod.None) { return("None"); } if (type == EWriteBackMethod.ByWriteBackField) { return("ByWriteBackField"); } if (type == EWriteBackMethod.ByEmail) { return("ByEmail"); } if (type == EWriteBackMethod.All) { return("All"); } throw new Exception(); }
public static string GetText(EWriteBackMethod type) { if (type == EWriteBackMethod.None) { return("���ظ���Ϣ"); } else if (type == EWriteBackMethod.ByWriteBackField) { return("ֱ�ӻظ���Ϣ"); } else if (type == EWriteBackMethod.ByEmail) { return("ͨ���ʼ��ظ���Ϣ"); } else if (type == EWriteBackMethod.All) { return("ͬʱʹ�����ֻظ���ʽ"); } else { throw new Exception(); } }
public static EWriteBackMethod GetEnumType(string typeStr) { EWriteBackMethod retval = EWriteBackMethod.None; if (Equals(EWriteBackMethod.None, typeStr)) { retval = EWriteBackMethod.None; } else if (Equals(EWriteBackMethod.ByWriteBackField, typeStr)) { retval = EWriteBackMethod.ByWriteBackField; } else if (Equals(EWriteBackMethod.ByEmail, typeStr)) { retval = EWriteBackMethod.ByEmail; } else if (Equals(EWriteBackMethod.All, typeStr)) { retval = EWriteBackMethod.All; } return(retval); }
public static bool Equals(string typeStr, EWriteBackMethod type) { return(Equals(type, typeStr)); }