protected BaseDAO GetDAO(Type type) { if (type == typeof(UserEntity)) { instance = new UserDAO(); } else if (type == typeof(ProductEntity)) { instance = new ProductDAO(); } else if (type == typeof(BillEntity)) { instance = new BillDAO(); } else if (type == typeof(GoodsImportEntity)) { instance = new GoodsImportDAO(); } else if (type == typeof(UserShiftEntity)) { instance = new ShiftDAO(); } return(instance); }
public static BaseDAO getInstance() { if (instance == null) { instance = new BaseDAO(); } return(instance); }