Exemplo n.º 1
0
        /// <summary>
        /// 检测文件的错误行数
        /// </summary>
        /// <param name="Path"></param>
        /// <returns></returns>
        public int check_errVINs(string Path)
        {
            NPOI_Read_Write _npoi_RW = new NPOI_Read_Write();
            string          _vins    = _npoi_RW.ReadeExcelFile(Path, 1);

            if (string.IsNullOrEmpty(_vins))
            {
                return((int)_errCode.isNull);
            }
            DataTable _data = GetCheckVIN(_vins);

            if (_data == null || _data.Rows.Count <= 0)
            {
                return((int)_errCode.isObjectNull);
            }
            int _errRow = 0;

            for (int i = 0; i < _data.Rows.Count; i++)
            {
                if (_data.Rows[i][1].ToString() == "否")
                {
                    _errRow++;
                }
            }
            return(_errRow);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取Campaign检测通过的Vin 夏男调用
        /// </summary>
        /// <param name="Path"></param>
        /// <returns></returns>
        public DataTable Get_check_CamVIN(string Path)
        {
            NPOI_Read_Write _npoi_RW = new NPOI_Read_Write();
            string          _vins    = _npoi_RW.ReadeExcelFile(Path, 1);
            DataTable       _data    = Get_CamVIN(_vins);

            return(_data);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 检测VIN ,同时写入文件
        /// </summary>
        /// <param name="Path"></param>
        /// <returns></returns>
        public int check_VINS(string Path)
        {
            NPOI_Read_Write _npoi_RW = new NPOI_Read_Write();
            string          _vins    = _npoi_RW.ReadeExcelFile(Path, 1);
            DataTable       _data    = GetCheckVIN(_vins);

            _npoi_RW.WriteExcelFile(Path, _data);
            return((int)_errCode.success);
        }