Removing unneccesary loops
This commit is contained in:
@@ -512,8 +512,6 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
|
||||
Console.WriteLine("Now you can modify these fields, except for the ID.");
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.Write("Name (text): ");
|
||||
@@ -538,14 +536,12 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
};
|
||||
|
||||
RestService.Post<Customer>(c, "/api/Customer/");
|
||||
break;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
Console.WriteLine("Invalid format!");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void Customer()
|
||||
{
|
||||
var menu = new ConsoleMenu();
|
||||
@@ -569,8 +565,6 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
|
||||
Console.WriteLine("Now you can modify these fields, except for the ID.");
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.Write("Name (text): ");
|
||||
@@ -599,14 +593,12 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
};
|
||||
|
||||
RestService.Post<Employee>(c, "/api/Employee/");
|
||||
break;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
Console.WriteLine("Invalid format!");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void Employee()
|
||||
{
|
||||
var menu = new ConsoleMenu();
|
||||
@@ -634,8 +626,6 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
|
||||
Console.WriteLine("Now you can modify these fields, except for the ID.");
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.Write("Name (text): ");
|
||||
@@ -676,14 +666,12 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
};
|
||||
|
||||
RestService.Post<Service>(c, "/api/Service/");
|
||||
break;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
Console.WriteLine("Invalid format!");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void Service()
|
||||
{
|
||||
var menu = new ConsoleMenu();
|
||||
@@ -706,8 +694,6 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
|
||||
Console.WriteLine("Now you can modify these fields, except for the ID.");
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.Write("Name (text): ");
|
||||
@@ -728,14 +714,12 @@ namespace WD7UVN_HFT_2023241.Client
|
||||
};
|
||||
|
||||
RestService.Post<MaintainerTeam>(c, "/api/MaintainerTeam/");
|
||||
break;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
Console.WriteLine("Invalid format!");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void MaintainerTeam()
|
||||
{
|
||||
var menu = new ConsoleMenu();
|
||||
|
||||
Reference in New Issue
Block a user