comentted while

This commit is contained in:
SamSys
2025-04-14 21:32:15 +03:30
parent 36480df2f5
commit 9376c2cca6

View File

@@ -82,71 +82,71 @@ namespace ServiceHost.Pages
//اصلاحات محاصبه پایه سنوات در فیش حقوقی
//_yearlySalaryRepository.TestDayliFeeCompute();
bool ex = false;
while (!ex)
{
Console.WriteLine("enter National code ... ");
var nationalCode = Console.ReadLine();
Console.WriteLine("enter DateOfBirth ... ");
var dateOfBirth = Console.ReadLine();
Console.WriteLine("enter phoneNumber ... ");
var phone = Console.ReadLine();
var res = _clientRegistrationApplication.CreateContractingPartyTemp(nationalCode, dateOfBirth, phone).GetAwaiter().GetResult();
if (res.IsSuccedded)
{
var updateAddress =
_clientRegistrationApplication.UpdateAddress(res.Data.Id, "gilan", "rasht", "hajiabad").GetAwaiter().GetResult();
if (updateAddress.IsSuccedded)
{
var workshopSelected = _clientRegistrationApplication.GetWorkshopTemp(res.Data.Id).GetAwaiter().GetResult();
if (workshopSelected.Count > 0)
{
var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id,"12","OneTime").GetAwaiter().GetResult();
Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble);
Console.WriteLine("TotalPaymentDouble : " + result.TotalPaymentDouble);
}
else
{
var workshops = new List<WorkshopTempViewModel>();
workshops.Add(new WorkshopTempViewModel
{
ContractAndCheckout = true,
ContractingPartyTempId = res.Data.Id,
CountPerson = 10,
CustomizeCheckout = true,
Insurance = true,
RollCall = true,
WorkshopName = "dadmehr",
//while (!ex)
//{
// Console.WriteLine("enter National code ... ");
// var nationalCode = Console.ReadLine();
// Console.WriteLine("enter DateOfBirth ... ");
// var dateOfBirth = Console.ReadLine();
// Console.WriteLine("enter phoneNumber ... ");
// var phone = Console.ReadLine();
// var res = _clientRegistrationApplication.CreateContractingPartyTemp(nationalCode, dateOfBirth, phone).GetAwaiter().GetResult();
// if (res.IsSuccedded)
// {
// var updateAddress =
// _clientRegistrationApplication.UpdateAddress(res.Data.Id, "gilan", "rasht", "hajiabad").GetAwaiter().GetResult();
// if (updateAddress.IsSuccedded)
// {
// var workshopSelected = _clientRegistrationApplication.GetWorkshopTemp(res.Data.Id).GetAwaiter().GetResult();
// if (workshopSelected.Count > 0)
// {
// var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id,"12","OneTime").GetAwaiter().GetResult();
// Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble);
// Console.WriteLine("TotalPaymentDouble : " + result.TotalPaymentDouble);
// }
// else
// {
// var workshops = new List<WorkshopTempViewModel>();
// workshops.Add(new WorkshopTempViewModel
// {
// ContractAndCheckout = true,
// ContractingPartyTempId = res.Data.Id,
// CountPerson = 10,
// CustomizeCheckout = true,
// Insurance = true,
// RollCall = true,
// WorkshopName = "dadmehr",
});
workshops.Add(new WorkshopTempViewModel
{
ContractAndCheckout = true,
ContractingPartyTempId = res.Data.Id,
CountPerson = 20,
CustomizeCheckout = true,
Insurance = true,
RollCall = true,
WorkshopName = "kababMahdi",
// });
// workshops.Add(new WorkshopTempViewModel
// {
// ContractAndCheckout = true,
// ContractingPartyTempId = res.Data.Id,
// CountPerson = 20,
// CustomizeCheckout = true,
// Insurance = true,
// RollCall = true,
// WorkshopName = "kababMahdi",
});
var creteWorkshops = _clientRegistrationApplication.CreateOrUpdateWorkshopTemp(workshops)
.GetAwaiter().GetResult();
// });
// var creteWorkshops = _clientRegistrationApplication.CreateOrUpdateWorkshopTemp(workshops)
// .GetAwaiter().GetResult();
if (creteWorkshops.IsSuccedded)
{
var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id).GetAwaiter().GetResult();
Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble);
Console.WriteLine("TotalPaymentDouble : " + result.TotalPaymentDouble);
}
}
// if (creteWorkshops.IsSuccedded)
// {
// var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id).GetAwaiter().GetResult();
// Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble);
// Console.WriteLine("TotalPaymentDouble : " + result.TotalPaymentDouble);
// }
// }
}
}
Console.WriteLine("do you want to exit ... ");
var exitCheck = Console.ReadLine();
if (exitCheck == "yes")
ex = true;
}
// }
// }
// Console.WriteLine("do you want to exit ... ");
// var exitCheck = Console.ReadLine();
// if (exitCheck == "yes")
// ex = true;
//}
// while (!ex)
// {