예제 #1
0
        /// <summary>
        /// 获取所有物料档案
        /// </summary>
        /// <returns></returns>
        public DataTable QueryInventoryAll()
        {
            var mfun      = new MSSQLFunction();
            var cmd       = new SqlCommand("select * from Inventory");
            var tempTable = mfun.GetSqlTableWithUsing(cmd);

            return(tempTable);
        }
예제 #2
0
        public static DataTable GetStoreDetail()
        {
            var cmd = new SqlCommand("spLocal_GetStoreDetail");

            cmd.CommandType = CommandType.StoredProcedure;
            var msf = new MSSQLFunction();

            return(msf.GetSqlTableWithUsing(cmd));
        }
예제 #3
0
        public static DataTable GetStoreDetailByDate(DateTime dStart, DateTime dEnd)
        {
            var cmd = new SqlCommand("spLocal_GetStoreDetailByDate");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@dStart", dStart);
            cmd.Parameters.AddWithValue("@dEnd", dEnd);
            var msf = new MSSQLFunction();

            return(msf.GetSqlTableWithUsing(cmd));
        }
예제 #4
0
        public DataTable QueryInventory(int iPageIndex, int iPageSize, ref int pageCount, ref int recordCount)
        {
            var mfun = new MSSQLFunction();
            var cmd  = new SqlCommand("GetRecordPage")
            {
                CommandType = CommandType.StoredProcedure
            };

            cmd.Parameters.AddWithValue("@PageIndex", iPageIndex);
            cmd.Parameters.AddWithValue("@TableRecord", "Inventory");
            cmd.Parameters.AddWithValue("@fldName", "I_id");
            cmd.Parameters.AddWithValue("@PageSize", iPageSize);
            cmd.Parameters.AddWithValue("@strWhere", "");



            var pageCountPara = new SqlParameter("@PageCount", SqlDbType.Int);

            pageCountPara.Direction = ParameterDirection.Output;


            var recordCountPara = new SqlParameter("@RecordCount", SqlDbType.Int);

            recordCountPara.Direction = ParameterDirection.Output;

            cmd.Parameters.Add(pageCountPara);
            cmd.Parameters.Add(recordCountPara);

            var tempTable = mfun.GetSqlTableWithUsing(cmd);

            pageCount   = (int)pageCountPara.Value;
            recordCount = (int)recordCountPara.Value;


            return(tempTable);
        }