manager view commition

This commit is contained in:
Aneliya Konarcheva
2021-03-19 14:25:23 +02:00
parent a4c097a8ca
commit 98f3e87441

View File

@@ -40,7 +40,7 @@ namespace Display.Views
try try
{ {
Console.WriteLine("Getting stock id..."); Console.WriteLine("Enter stock id...");
id = int.Parse(Console.ReadLine()); id = int.Parse(Console.ReadLine());
stockctrl.Get(id); stockctrl.Get(id);
@@ -58,8 +58,9 @@ namespace Display.Views
try try
{ {
Console.WriteLine("Getting stock by time..."); Console.WriteLine("Getting stock by time...");
Console.WriteLine("Enter start time: ");
startTime = new DateTime(); startTime = new DateTime();
Console.WriteLine("Enter end time: ");
endTime = new DateTime(); endTime = new DateTime();
stockctrl.GetByTime(startTime, endTime); stockctrl.GetByTime(startTime, endTime);
@@ -76,7 +77,9 @@ namespace Display.Views
try try
{ {
Console.WriteLine("Adding stock by product id..."); Console.WriteLine("Adding stock by product id...");
Console.WriteLine("Enter product id: ");
productId = int.Parse(Console.ReadLine()); productId = int.Parse(Console.ReadLine());
Console.WriteLine("Enter stock amount:");
amount = double.Parse(Console.ReadLine()); amount = double.Parse(Console.ReadLine());
stockctrl.Add(productId, amount); stockctrl.Add(productId, amount);
} }
@@ -92,6 +95,7 @@ namespace Display.Views
try try
{ {
Console.WriteLine("Adding stock by product name..."); Console.WriteLine("Adding stock by product name...");
Console.WriteLine("Enter product name: ");
productName = Console.ReadLine(); productName = Console.ReadLine();
amount = double.Parse(Console.ReadLine()); amount = double.Parse(Console.ReadLine());
stockctrl.Add(productName, amount); stockctrl.Add(productName, amount);
@@ -108,6 +112,7 @@ namespace Display.Views
try try
{ {
Console.WriteLine("Deleting stock"); Console.WriteLine("Deleting stock");
Console.WriteLine("Enter deal id: ");
id = int.Parse(Console.ReadLine()); id = int.Parse(Console.ReadLine());
dealctrl.Delete(id); dealctrl.Delete(id);
} }