Example #1
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            //#region 不能连续两次点击 OrderDetails Form


            //foreach (Control item in this.splitContainer.Panel1.Controls)
            //{
            //    if (item is OrderDetailsPage)
            //    {
            //        if (MessageBox.Show(this, "You should choose one transaction firstly?", "Prompt", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            //        {
            //            ((Form)item).Close();
            //            this.DisplayMainFrm(true);
            //            return;
            //        }
            //    }
            //}

            //#endregion

            if (dgvTransaction.RowCount == 0)
            {
                return;
            }
            _orderNo        = dgvTransaction.CurrentRow.Cells["OrderNo"].Value.ToString();
            _frmOrderDetail = new OrderDetailsPage();
            EvtOpenEdit    += _frmOrderDetail.EditReceiver;
            EvtOpenEdit(_orderNo);
            _frmOrderDetail.EvtSendMsg += Receiver;
            DisplayMainFrm(false);
            OpenNewForm(_frmOrderDetail);
        }
Example #2
0
        /// <summary>
        ///     double click item to check the information of the order
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvUndoneOrders_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var orderNo = dgvUndoneOrders.CurrentRow.Cells["OrderNo"].Value.ToString();

            _frmOrderDetail   = new OrderDetailsPage();
            EvtSendOperation += _frmOrderDetail.ViewReceiver;
            EvtSendOperation(orderNo, _parentContainer);
            OpenNewForm(_frmOrderDetail);
        }
Example #3
0
 private void dgvTransaction_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     _orderNo        = dgvTransaction.CurrentRow.Cells["OrderNo"].Value.ToString();
     _frmOrderDetail = new OrderDetailsPage();
     EvtOpenView    += _frmOrderDetail.ViewReceiver; // 关联子窗体,传递订单号信息
     EvtOpenView(_orderNo, splitContainer.Panel1);
     DisplayMainFrm(false);
     OpenNewForm(_frmOrderDetail);
 }
Example #4
0
        /// <summary>
        ///     view details
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDetail_Click(object sender, EventArgs e)
        {
            if (dgvTransaction.RowCount == 0)
            {
                return;
            }

            _orderNo        = dgvTransaction.CurrentRow.Cells["OrderNo"].Value.ToString();
            _frmOrderDetail = new OrderDetailsPage();
            EvtOpenView    += _frmOrderDetail.ViewReceiver; // 关联子窗体,传递订单号信息
            EvtOpenView(_orderNo, splitContainer.Panel1);

            #region 回传消息给主窗体,让其刷新交易列表

            //_frmOrderDetail.EvtSendMsg += this.Receiver;//关联子窗体,添加发送消息方法,用于刷新交易列表

            #endregion

            DisplayMainFrm(false);
            OpenNewForm(_frmOrderDetail);
        }