示例#1
0
        private void btnUpdateLineItem_Click_2(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selectedVendorOrderLineItem = this.lvReceiving.SelectedItems;
            if (selectedVendorOrderLineItem.Count > 0)
            {
                //int vendorID = Convert.ToInt32(selectedVendor[0].SubItems[0].Text);
                //Vendor thisVendor = _myVendorManager.GetVendor(vendorID);
                //FrmVendorAddUpdate frm = new FrmVendorAddUpdate(_myAccessToken, thisVendor);
                //frm.ShowDialog();
                //findActiveSelection();
                VendorManager _vendorManager = new VendorManager();
                int           productID      = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[0].Text);
                int           id             = Convert.ToInt32(txtVendorOrderID.Text);
                string        vendorName     = txtVendorName.Text;
                int           vendorID       = Convert.ToInt32(txtVendorID.Text);

                VendorOrderLineItem item = new VendorOrderLineItem(id, productID);
                item.ProductID   = productID;
                item.Name        = selectedVendorOrderLineItem[0].SubItems[1].Text;
                item.QtyOrdered  = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[2].Text);
                item.QtyReceived = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[3].Text);
                item.QtyDamaged  = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[4].Text);
                item.Note        = selectedVendorOrderLineItem[0].SubItems[5].Text;


                _frmUpdateVendorOrderLineItem = new FrmUpdateVendorOrderLineItem(item, vendorName, vendorID, _myAccessToken);
                _frmUpdateVendorOrderLineItem.ShowDialog();
                populateListView();
            }
        }
示例#2
0
        private void btnUpdateOrder_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selectedVendorOrderLineItem = this.lvReceiving.SelectedItems;
            if (selectedVendorOrderLineItem.Count > 0)
            {
                //int vendorID = Convert.ToInt32(selectedVendor[0].SubItems[0].Text);
                //Vendor thisVendor = _myVendorManager.GetVendor(vendorID);
                //FrmVendorAddUpdate frm = new FrmVendorAddUpdate(_myAccessToken, thisVendor);
                //frm.ShowDialog();
                //findActiveSelection();
                VendorManager _vendorManager = new VendorManager();
                int productID = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[0].Text);
                int id = Convert.ToInt32(txtVendorOrderID.Text);
                string vendorName = txtVendorName.Text;
                int vendorID = Convert.ToInt32(txtVendorID.Text);

                VendorOrderLineItem item = new VendorOrderLineItem(id, productID);
                item.ProductID = productID;
                item.Name = selectedVendorOrderLineItem[0].SubItems[1].Text;
                item.QtyOrdered = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[2].Text);
                item.QtyReceived = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[3].Text);
                item.QtyDamaged = Convert.ToInt32(selectedVendorOrderLineItem[0].SubItems[4].Text);
                item.Note = selectedVendorOrderLineItem[0].SubItems[5].Text;

                _frmUpdateVendorOrderLineItem = new FrmUpdateVendorOrderLineItem(item, vendorName, vendorID, _myAccessToken);
                _frmUpdateVendorOrderLineItem.ShowDialog();
                populateListView();
            }
        }