Beispiel #1
0
        public IActionResult BuyInsurance(BuyInsuranceViewModel data)
        {
            // Validate and process payments through payment gateway
            // Save policy details and link it with loan

            int insurancePolicyId = 0;

            return(RedirectToAction("Thankyou", new { insurancePolicyId }));
        }
Beispiel #2
0
 /// <summary>
 /// 保险管理购买保险窗体
 /// </summary>
 /// <param name="call"></param>
 internal static void ShowBuyInsurance(Action <bool?> call = null)
 {
     DispatcherHelper.UIDispatcher.Invoke(new Action(() =>
     {
         var window         = new BuyInsuranceWindow();
         var vm             = new BuyInsuranceViewModel();
         window.Owner       = Application.Current.MainWindow;
         window.DataContext = vm;
         var result         = window.ShowDialog();
         if (call != null)
         {
             call(result);
         }
         window.DataContext = null;
     }));
 }