diff --git a/ServiceHost/Pages/Index.cshtml.cs b/ServiceHost/Pages/Index.cshtml.cs index 8a22700d..11a1ddc2 100644 --- a/ServiceHost/Pages/Index.cshtml.cs +++ b/ServiceHost/Pages/Index.cshtml.cs @@ -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(); - 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(); + // 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) // {