Menu

[Solved]Copied Pasted Coded Needed Using System Using Systemcollectionsgeneric Using Systemcompone Q37228551

Have copied and pasted the coded needed.

In this lab assignment, youll add a class to an Inventory Maintenance application. Inventory Maintenance 3245649 Agapanthus

Gets or sets a decimal that contains the items price. Description Returns a string that contains the items number, descript

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace InventoryMaintenance
{
public partial class frmInvMaint : Form
   {
       public frmInvMaint()
       {
          InitializeComponent();
       }

// Add a statement here that declares the list of items.

       private voidfrmInvMaint_Load(object sender, EventArgs e)
       {
// Add a statement here that gets the list of items.
          FillItemListBox();
       }

       private voidFillItemListBox()
       {
          lstItems.Items.Clear();
// Add code here that loads the list box with the items in thelist.
       }

       private void btnAdd_Click(objectsender, EventArgs e)
       {
// Add code here that creates an instance of the New Itemform
// and then gets a new item from that form.
       }

       private voidbtnDelete_Click(object sender, EventArgs e)
       {
           int i =lstItems.SelectedIndex;
           if (i !=-1)
           {
// Add code here that displays a dialog box to confirm
// the deletion and then removes the item from the list,
// saves the list of products, and refreshes the list box
// if the deletion is confirmed.
           }
       }

       private voidbtnExit_Click(object sender, EventArgs e)
       {
          this.Close();
       }
   }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace InventoryMaintenance
{
public partial class frmNewItem : Form
{
public frmNewItem()
{
InitializeComponent();
}

// Add a statement here that declares the inventory item.

// Add a method here that gets and returns a new item.

private void btnSave_Click(object sender, EventArgs e)
{
if (IsValidData())
{
// Add code here that creates a new item
// and closes the form.
}
}

private bool IsValidData()
{
return Validator.IsPresent(txtItemNo) &&
Validator.IsInt32(txtItemNo) &&
Validator.IsPresent(txtDescription) &&
Validator.IsPresent(txtPrice) &&
Validator.IsDecimal(txtPrice);
}

private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

In this lab assignment, you’ll add a class to an Inventory Maintenance application. Inventory Maintenance 3245649 Agapanthus ($7.95) 3762592 Limnium ($6.95) 9210584 Snail pellets ($12.95) 4738459 Japanese Red Maple ($89.95) Add Item Delete tem. Ed New Inventory Item Confirm Delete tem no 4237589 Description: Crepe Myrtle Are you sure you want to delete Limonium? Price 79.95 Save Cancel Yes Open the project and add an InvItem class 1. Download the InventoryMaintenance project from this assignment’s attachment, open and test it in Visual Studio 2015, the project cannot execute because some code is missing 2. Add a class named InvItem to this project, and add the properties, method, and constructors that are shown in the table below Property Description Gets or sets an integer that contains the item’s number. Gets or sets a string that contains the item’s description. Description Gets or sets a decimal that contains the item’s price. Description Returns a string that contains the item’s number, description, and price formatted like this: 245649 Agapanthus ($7.95). (The item number and description are separated by four spaces.) Description Creates an InvItem object with default values. Price Method GetDisplayText() Constructor New () New (itemNo, description, price) Creates an InvItem object with the specified values. Show transcribed image text In this lab assignment, you’ll add a class to an Inventory Maintenance application. Inventory Maintenance 3245649 Agapanthus ($7.95) 3762592 Limnium ($6.95) 9210584 Snail pellets ($12.95) 4738459 Japanese Red Maple ($89.95) Add Item Delete tem. Ed New Inventory Item Confirm Delete tem no 4237589 Description: Crepe Myrtle Are you sure you want to delete Limonium? Price 79.95 Save Cancel Yes Open the project and add an InvItem class 1. Download the InventoryMaintenance project from this assignment’s attachment, open and test it in Visual Studio 2015, the project cannot execute because some code is missing 2. Add a class named InvItem to this project, and add the properties, method, and constructors that are shown in the table below Property Description Gets or sets an integer that contains the item’s number. Gets or sets a string that contains the item’s description. Description
Gets or sets a decimal that contains the item’s price. Description Returns a string that contains the item’s number, description, and price formatted like this: 245649 Agapanthus ($7.95). (The item number and description are separated by four spaces.) Description Creates an InvItem object with default values. Price Method GetDisplayText() Constructor New () New (itemNo, description, price) Creates an InvItem object with the specified values.

Expert Answer


Answer to Have copied and pasted the coded needed. using System; using System.Collections.Generic; using System.ComponentModel; us… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *