private void m_rDoFillInBtn_Click(object sender, EventArgs e)
        {
            if (this.m_rInputTableBlock.Text.Trim() == "" ||
                this.m_rConfigurationBlock.Text.Trim() == "" ||
                this.m_rNoSaleTableBlock.Text.Trim() == "")
            {
                return;
            }
            this.m_rFunc1Operator.setInputExcelPath(this.m_rInputTableBlock.Text);
            this.m_rFunc1Operator.setConfigFilePath(this.m_rConfigurationBlock.Text);
            this.m_rFunc1Operator.setNoSalePath(this.m_rNoSaleTableBlock.Text);
            getSaveAsPath rGetPathFunc = new getSaveAsPath(() =>
            {
                if (this.m_rSaveAsDialog.ShowDialog() == DialogResult.OK)
                {
                    return(m_rSaveAsDialog.FileName);
                }
                else
                {
                    return(string.Empty);
                }
            });

            m_rFunc1Operator.execute(ref this.richTextBox1, rGetPathFunc);
        }
Exemple #2
0
        //
        //修改接口
        //

        public void alterData(Dictionary <string, ExchangeState> rDataMap, getSaveAsPath rSavePath)
        {
            foreach (var it in rDataMap)
            {
                m_rXmlOperator.setClothSaleState(it.Key, it.Value, m_rNoSaleMap);
            }
            m_rXmlOperator.outputNewXml(rSavePath());
        }
Exemple #3
0
        public void execute(ref System.Windows.Forms.RichTextBox rLog, getSaveAsPath rSavePath)
        {
            string szError = "";

            rLog.Clear();
            //错误提示 null m_szConfigPath m_szInputPath
            m_rXmlOperator.build(m_szConfigPath);
            initNoSale();
            m_rExcelOperator.excelFillIn(m_szInputPath, TableRowWriteFunc, ref szError);
            string szXmlSavePath = rSavePath();

            if (string.Empty != szXmlSavePath)
            {
                generateXmlFile(szXmlSavePath);
            }
            rLog.AppendText(szError);
            writeLopFile(szError);
            m_rExcelOperator.saveAsNewFile();
        }
        private void m_rChangeNode_Click(object sender, EventArgs e)
        {
            Dictionary <string, ExchangeState> rDataMap = new Dictionary <string, ExchangeState>();

            for (int index = 0; index < this.dataGridView1.RowCount; ++index)
            {
                string        szID   = this.dataGridView1.Rows[index].Cells["Column1"].Value.ToString();
                ExchangeState eState = this.rSelection[index];
                rDataMap.Add(szID, eState);
            }
            getSaveAsPath rGetPathFunc = new getSaveAsPath(() =>
            {
                if (this.m_rSaveAsDialog.ShowDialog() == DialogResult.OK)
                {
                    return(m_rSaveAsDialog.FileName);
                }
                else
                {
                    return(string.Empty);
                }
            });

            this.m_rSaleChange.alterData(rDataMap, rGetPathFunc);
        }