/// <summary> /// 执行操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOperate_Click(object sender, EventArgs e) { DataGridViewRow row = dgvData.CurrentRow; string slipNumber = CConvert.ToString(row.Cells["SLIP_NUMBER"].Value); if (!string.IsNullOrEmpty(slipNumber)) { FrmBase frm = new FrmQuotation(slipNumber); frm.CTag = CConstant.QUOTATION_OPERATE; frm.UserTable = _userInfo; if (DialogResult.OK == frm.ShowDialog()) { } frm.Dispose(); } else { MessageBox.Show("请先选择一张订单。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
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(); } } } } }
private void btnModify_Click(object sender, EventArgs e) { DataGridViewRow row = dgvData.CurrentRow; //if (CConvert.ToInt32(row.Cells["ORDER_FLAG"].Value) <= 0) // { string slipNumber = CConvert.ToString(row.Cells["SLIP_NUMBER"].Value); if (!string.IsNullOrEmpty(slipNumber)) { FrmBase frm = new FrmQuotation(slipNumber); frm.CTag = CConstant.QUOTATION_MODIFY; frm.UserTable = _userInfo; if (DialogResult.OK == frm.ShowDialog()) { BindData(this.pgControl.GetCurrentPage()); } frm.Dispose(); } else { MessageBox.Show("请先选择一张订单。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } }