Пример #1
0
        public DataSet SelectBookStock(int index, string info)
        {
            DataSet       ds  = new DataSet();
            StringBuilder sql = new StringBuilder("SELECT  PlanBook.BookName as '教材名称', PlanBook.ISBN as 'ISBN码', PlanBook.Author as '作者', PlanBook.Publish as '出版社', PlanBook.Price as '标价',BookStock.NetPrice as '实价',PlanBook.BookTotalNum as '订购数量', BookStock.ArriveQuantity as '库存数量',BookStock.NoArriveQuantity as '未到数量'  FROM  BookStock INNER JOIN PlanBook ON BookStock.PlanBookID = PlanBook.PlanBookID where BookStock.Arrived='true'");

            if (index == 1)
            {
                sql.Append(" and PlanBook.BookName like @BookName");
                SqlParameter[] parameter = { new SqlParameter("@BookName", info) };
                ds = DBHelpers.GetAllInfoToDataSet(sql.ToString(), parameter);
            }
            if (index == 2)
            {
                sql.Append(" and PlanBook.ISBN like @ISBN");
                SqlParameter[] parameter = { new SqlParameter("@ISBN", info) };
                ds = DBHelpers.GetAllInfoToDataSet(sql.ToString(), parameter);
            }
            if (index == 3)
            {
                sql.Append(" and PlanBook.Author like @Author");
                SqlParameter[] parameter = { new SqlParameter("@Author", info) };
                ds = DBHelpers.GetAllInfoToDataSet(sql.ToString(), parameter);
            }
            if (index == 4)
            {
                sql.Append(" and PlanBook.Publish like @Publish");
                SqlParameter[] parameter = { new SqlParameter("@Publish", info) };
                ds = DBHelpers.GetAllInfoToDataSet(sql.ToString(), parameter);
            }
            return(ds);
        }
Пример #2
0
        public DataSet NoArriveBook()
        {
            string sql = "SELECT BookStock.BookStockID ,PlanBook.BookName, PlanBook.ISBN, PlanBook.Author, PlanBook.Publish, PlanBook.Price, PlanBook.BookTotalNum, BookStock.ArriveQuantity ,BookStock.NoArriveQuantity  FROM PlanBook INNER JOIN BookStock ON PlanBook.PlanBookID = BookStock.PlanBookID where BookStock.NoArriveQuantity>0";

            return(DBHelpers.GetAllInfoToDataSet(sql));
        }
Пример #3
0
        public DataSet SelectBookStock()
        {
            string sql = "SELECT  PlanBook.BookName as '教材名称', PlanBook.ISBN as 'ISBN码', PlanBook.Author as '作者', PlanBook.Publish as '出版社', PlanBook.Price as '标价',BookStock.NetPrice as '实价',PlanBook.BookTotalNum as '订购数量', BookStock.ArriveQuantity as '库存数量',BookStock.NoArriveQuantity as '未到数量'  FROM  BookStock INNER JOIN PlanBook ON BookStock.PlanBookID = PlanBook.PlanBookID where BookStock.Arrived='true'";

            return(DBHelpers.GetAllInfoToDataSet(sql));
        }
Пример #4
0
        public DataSet NoArriveBook()
        {
            string sql = "SELECT PlanBook.BookName as '教材名称', PlanBook.ISBN as 'ISBN码', PlanBook.Author as '作者', PlanBook.Publish as '出版社', PlanBook.Price as '标价', PlanBook.BookTotalNum as '订购数量', BookStock.ArriveQuantity as '已到数量',BookStock.NoArriveQuantity as '未到数量' FROM PlanBook INNER JOIN BookStock ON PlanBook.PlanBookID = BookStock.PlanBookID";

            return(DBHelpers.GetAllInfoToDataSet(sql));
        }