コード例 #1
0
        private int WriteFactory(Worksheet pSheet, CFactory pFactory, int row, int column)
        {
            List <ProductTag> input = pFactory.GetInputArray();
            int    realCount        = 0;
            string factoryName      = pFactory.GetFactName();

            pSheet.Cells[row, column] = factoryName;
            Range pTitleRange = Utils.GetRange(pSheet, row, column, row, column + 4);

            pTitleRange.Merge();
            pTitleRange.Interior.Color = Color.Bisque;
            realCount++;
            for (int i = 0; i < input.Count; i++)
            {
                ProductTag tag     = input[i];
                int        value   = pFactory.GetTagCount(tag);
                int        currRow = row + realCount;
                string     tagName = m_spisok.GetName(tag);

                if (value > 0)
                {
                    realCount++;
                    pSheet.Cells[currRow, column].ColumnWidth = 20;
                    Utils.WriteTagString(pSheet, currRow, column, tagName, value);
                }
            }

            return(realCount);
        }
コード例 #2
0
        void UploadFactory()
        {
            List <ProductTag> input = m_pFactory.GetInputArray();

            for (int i = 0; i < input.Count; i++)
            {
                ProductTag tag   = input[i];
                int        value = m_pFactory.GetTagCount(tag);
                m_pSheet.Cells[m_startRow + 2 + i, m_startColumn]     = m_spisok.GetName(tag);
                m_pSheet.Cells[m_startRow + 2 + i, m_startColumn + 1] = value.ToString();
            }
        }
コード例 #3
0
        private void ExportFactory(Worksheet pSheet, CFactory pFactory, ref int row)
        {
            List <ProductTag> input = pFactory.GetInputArray();

            for (int i = 0; i < input.Count; i++)
            {
                ProductTag tag   = input[i];
                int        value = pFactory.GetTagCount(tag);
                if (value > 0)
                {
                    pSheet.Cells[row, 1] = m_spisok.GetName(tag);
                    pSheet.Cells[row, 2] = value.ToString();
                    row++;
                }
            }
        }