Beispiel #1
0
        private void dgvData_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                DataGridViewRow row = dgvData.Rows[e.RowIndex];

                if (e.ColumnIndex == dgvData.Columns["UPDATE_COUNT"].Index)
                {
                    if (CConvert.ToInt32(row.Cells["UPDATE_COUNT"].Value) > 0)
                    {
                        FrmHistoryQuotation frm = new FrmHistoryQuotation(CConvert.ToString(row.Cells["SLIP_NUMBER"].Value));
                        if (DialogResult.OK == frm.ShowDialog(this))
                        {
                            FrmBase frmOrder = new FrmQuotation(frm.historySlipNumber);
                            frmOrder.CTag      = CConstant.ORDER_HISTORY;
                            frmOrder.UserTable = _userInfo;
                            frmOrder.ShowDialog();
                        }
                    }
                }

                else if (e.ColumnIndex == dgvData.Columns["ATTACHED_NAME"].Index)
                {
                    if (CConvert.ToString(row.Cells["SLIP_NUMBER"].Value) != "")
                    {
                        Czzd.Common.Library.FTPOperate myftp = new Czzd.Common.Library.FTPOperate("112.82.245.2", "YS_ERP\\quotation\\" + row.Cells["SLIP_NUMBER"].Value, "FTP_user", "czzd", 21);
                        string[] files = myftp.Dir("\\YS_ERP\\quotation\\" + row.Cells["SLIP_NUMBER"].Value);
                        #region 附件
                        if (files.Length > 1)
                        {
                            string attachedDirectory = CCacheData.GetAttacheDirectory(CConstant.ATTACHE_DIRECTORY_QUOTATION);
                            string slipNumber        = CConvert.ToString(row.Cells["SLIP_NUMBER"].Value);
                            FrmAttachedQuatation frm = new FrmAttachedQuatation(slipNumber, attachedDirectory, true);
                            frm.CTag = CConstant.QUOTATION_MODIFY;
                            frm.ShowDialog(this);
                            frm.Dispose();
                        }
                    }
                }
            }
        }
Beispiel #2
0
        private void btnAttached_Click(object sender, EventArgs e)
        {
            FrmAttachedQuatation frm = new FrmAttachedQuatation();

            if (string.IsNullOrEmpty(_oldSlipNumber))
            {
                frm = new FrmAttachedQuatation(_tmpAttachedDirectoryName, _attachedDirectory);
            }
            else
            {
                //FrmBase frm1 = new FrmAttachedQuatation();

                frm      = new FrmAttachedQuatation(_oldSlipNumber, _attachedDirectory);
                frm.CTag = CConstant.QUOTATION_MODIFY;
            }

            if (frm != null)
            {
                frm.ShowDialog(this);
                attachedNumber = frm.AttachedNumber;
                frm.Dispose();
            }
        }