public enuBillPrintType GetIDFromName(string Name) { enuBillPrintType c = new enuBillPrintType(); for (int i = 0; i < 100; i++) { c = (enuBillPrintType)i; if (c.ToString() == Name) { return(c); } } return((enuBillPrintType)int.Parse(Name)); }
/// <summary> /// 返回中文 /// </summary> /// <summary> /// 获得全部列表 /// </summary> /// <returns>ArrayList(BillPrintType)</returns> public static ArrayList List() { BillPrintType o; enuBillPrintType e = new enuBillPrintType(); ArrayList alReturn = new ArrayList(); int i; for (i = 0; i <= System.Enum.GetValues(e.GetType()).GetUpperBound(0); i++) { o = new BillPrintType(); o.ID = (enuBillPrintType)i; o.Memo = i.ToString(); alReturn.Add(o); } return(alReturn); }