Ejemplo n.º 1
0
        private void btnDeactivateProduct_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selectedVendor = this.lvVendors.SelectedItems;
            if (selectedVendor.Count > 0)
            {
                int     vendorID   = Convert.ToInt32(selectedVendor[0].SubItems[0].Text);
                Vendor  thisVendor = _myVendorManager.GetVendor(vendorID);
                Boolean success    = _myVendorManager.DeactivateVendor(thisVendor);

                if (success == true)
                {
                    MessageBox.Show("The vendor " + thisVendor.Name + " was deactivated");
                }
                findActiveSelection();
            }
        }