ef relation
This commit is contained in:
@@ -16,7 +16,7 @@ namespace InventoryManagement
|
||||
{
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Pease Enter the command.");
|
||||
Console.WriteLine("(show: Show current Inventory, add: Add new product, buy: Buy product, sell: Sell product)");
|
||||
Console.WriteLine("(show: Show current Inventory, add: Add new product, buy: Buy product, sell: Sell product, acc: Add accessary)");
|
||||
Console.Write("CMD> ");
|
||||
string cmd = Console.ReadLine().ToLower();
|
||||
switch (cmd)
|
||||
@@ -81,6 +81,18 @@ namespace InventoryManagement
|
||||
InventoryManager.SellProduct(name, quantity);
|
||||
break;
|
||||
}
|
||||
case "acc":
|
||||
{
|
||||
Console.Write("\tProduct id: ");
|
||||
string productId = Console.ReadLine();
|
||||
int pId = int.Parse(productId);
|
||||
Console.Write("\tAccessary name: ");
|
||||
string name = Console.ReadLine();
|
||||
Console.Write("\tAccessary description: ");
|
||||
string desc = Console.ReadLine();
|
||||
InventoryManager.AddAccessary(pId, name, desc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user