Ejemplo n.º 1
0
        /// <summary>
        /// 在未QC库中搜索
        /// </summary>
        private void _searchNotQC(List <SearchItem> list, NnExcel ne)
        {
            StockInfos infos = new StockInfos();

            try
            {
                using (OleDbCommand cmd = new OleDbCommand())
                {
                    cmd.Connection = m_connection;
                    foreach (var v in list)
                    {
                        if (string.IsNullOrWhiteSpace(v.Value))
                        {
                            continue;
                        }
                        if (v.SearchType == SearchType.WorkNo)
                        {
                            _initNotQCWorkNoSearch(infos, cmd, v);
                        }
                        else
                        {
                            _initNotQCCoordinateAndOrderIDSearch(infos, cmd, v);
                        }
                    }
                }
                object[][] vs = infos.GetValues();

                ne.AddValueWithName(vs, 1, 9, "半纯品");
                ne.AutoFit(new int[] { 2, 3, 4, 8 });
                ne.SetColor(NPoint.GetPoint(1, 1), NPoint.GetPoint(1, 7), NnExcel.ColorType.Blue);
                ne.SetColor(NPoint.GetPoint(infos.CountNormal + 2, 1), NPoint.GetPoint(infos.CountNormal + 3, 9), NnExcel.ColorType.Blue);
            }
            catch (Exception e) { Console.WriteLine(e.ToString()); }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 在库存中搜索
        /// </summary>
        private void _searchStock(List <SearchItem> list, NnExcel ne)
        {
            StockSearcher stSearcher = new StockSearcher();

            foreach (var v in list)
            {
                _getSearchValues(v.Value, stSearcher);
            }
            object[][] vs = stSearcher.GetValues();


            ne.AddValueWithName(vs, 1, 11, "库存");
            ne.AutoFit(new int[] { 2, 3, 4 });
            ne.SetColor(NPoint.GetPoint(1, 1), NPoint.GetPoint(1, 9), NnExcel.ColorType.Blue);
            ne.SetColor(NPoint.GetPoint(stSearcher.CountNormal + 2, 1), NPoint.GetPoint(stSearcher.CountNormal + 3, 11), NnExcel.ColorType.Blue);
        }