public static DataTable GetTable(string optrType) { if (optrType == "All") { return(MainDictType.FindAll().ToDataTable()); } return(MainDictType.Find(CK.K["OptrType"] == optrType).ToDataTable()); }
public static List <MainDictType> GetDictType(string optrType) { MainDictType md = MainDictType.New; md.Id = 0; md.Name = "请选择"; if (optrType == "All") { List <MainDictType> mainDictTypes = MainDictType.FindAll(); mainDictTypes.Insert(0, md); return(mainDictTypes); } else { List <MainDictType> mainDictTypes = MainDictType.Find(CK.K["OptrType"] == optrType); mainDictTypes.Insert(0, md); return(mainDictTypes); } }