Beispiel #1
0
        private void dtgvMOutOrders_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow curRow = dtgvMOutOrders.CurrentRow;

            if (null != curRow)
            {
                Order order = new Order();
                order.Amount      = StringUtil.Obj2Decimal(curRow.Cells[colAmount.Name].Value);
                order.OrderNO__PK = StringUtil.Obj2Str(curRow.Cells[colOrderNO.Name].Value);
                order.CustName    = StringUtil.Obj2Str(curRow.Cells[colReseller.Name].Value);

                StockOutOrderDetailForm detailForm = new StockOutOrderDetailForm(order, stockOutManager);
                detailForm.ShowDialog();
            }
        }
        private void dtgvOrders_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (null == dtgvOrders.CurrentRow)
            {
                return;
            }
            if (cboxBillResellers.SelectedIndex == -1)
            {
                return;
            }
            Customer reseller = cboxBillResellers.SelectedItem as Customer;
            Order    order    = new Order();

            order.CustName = reseller.CName;
            order.CustID   = reseller.CID__PK;

            order.OrderNO__PK = StringUtil.Obj2Str(dtgvOrders.CurrentRow.Cells["colOrderNO"].Value);
            order.Amount      = StringUtil.Obj2Decimal(dtgvOrders.CurrentRow.Cells["colAmount"].Value);
            order.Direct      = StringUtil.Obj2Str(dtgvOrders.CurrentRow.Cells["colDirect"].Value);

            if (DIRECT.STOCK_OUT == order.Direct)
            {
                if (null == stockoutManager)
                {
                    stockoutManager = InterfaceProxyGenerator.CreateInterfaceProxy <IStockOutManager>(MainForm.usr);
                }
                StockOutOrderDetailForm detailForm = new StockOutOrderDetailForm(order, stockoutManager);
                detailForm.ShowDialog();
            }
            else if (DIRECT.RESELLER_REFUND == order.Direct)
            {
                if (null == refundManager)
                {
                    refundManager = InterfaceProxyGenerator.CreateInterfaceProxy <IResellerRefundManager>(MainForm.usr);
                }
                RefundOrderDetailForm detailForm = new RefundOrderDetailForm(order, refundManager);
                detailForm.ShowDialog();
            }
        }