Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public static BaseDAO getInstance()
        {
            if (instance == null)
            {
                instance = new BaseDAO();
            }

            return(instance);
        }