コード例 #1
0
 private void btnPackComplete_Click(object sender, EventArgs e)
 {
     ListView.SelectedListViewItemCollection selectedOrder = this.lvPackList.SelectedItems;
     try
     {
         int selectedOrderId = Convert.ToInt32(selectedOrder[0].SubItems[0].Text);
         ShippingOrder currentOrder = _myOrderManager.GetOrderByID(selectedOrderId);
         currentOrder.ShippingOrderLineItemList = _shippingLineItemMan.GetLineItemsByID(selectedOrderId);
         Boolean success = _myOrderManager.UpdateShippedDate(currentOrder);
         _myOrderManager.UpdateUserId(currentOrder, _myAccessToken.UserID);
         if (success == true)
         {
             MessageBox.Show("Now Printing Pack Slip", "Packing Complete");
             RefreshPackView();
             frmPrintPackReport packReport = new frmPrintPackReport(currentOrder, _myAccessToken);
             packReport.ShowDialog();
             packReport = null;
         }
         else
         {
             MessageBox.Show("Cannot complete action.", "Refreshing");
             RefreshPackView();
         }
     }
     catch (ArgumentOutOfRangeException)
     {
         MessageBox.Show("Please select an order from the list", "No Order Selected");
     }
 }
コード例 #2
0
        }//End PopulatePackListView(..)

        private void btnPackComplete_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selectedOrder = this.lvPackList.SelectedItems;
            try
            {
                int           selectedOrderId = Convert.ToInt32(selectedOrder[0].SubItems[0].Text);
                ShippingOrder currentOrder    = _myOrderManager.GetOrderByID(selectedOrderId);
                currentOrder.ShippingOrderLineItemList = _shippingLineItemMan.GetLineItemsByID(selectedOrderId);
                Boolean success = _myOrderManager.UpdateShippedDate(currentOrder);
                _myOrderManager.UpdateUserId(currentOrder, _myAccessToken.UserID);
                if (success == true)
                {
                    MessageBox.Show("Now Printing Pack Slip", "Packing Complete");
                    RefreshPackView();
                    frmPrintPackReport packReport = new frmPrintPackReport(currentOrder, _myAccessToken);
                    packReport.ShowDialog();
                    packReport = null;
                }
                else
                {
                    MessageBox.Show("Cannot complete action.", "Refreshing");
                    RefreshPackView();
                }
            }
            catch (ArgumentOutOfRangeException)
            {
                MessageBox.Show("Please select an order from the list", "No Order Selected");
            }
        }//End btnPackComplete_Click(..)