private void BTN_PayMent_Click(object sender, RoutedEventArgs e) { var res = (Service)DataGrid_Main.SelectedItem; if (KhorshidContext.Services.FirstOrDefault(d => d.Id == res.Id) is Service service) { service.PricePay = int.Parse(txt_main.Text.Replace(",", "")); KhorshidContext.SaveChanges(); } FinalPayment.HideUsingLinearAnimation(milliSeconds: 250); App.Navigator.Navigate(new MyService(driver)); }
private void EditItem_Button_Click(object sender, RoutedEventArgs e) { if (DataGrid_Main.SelectedItems.Count > 0) { var res = (Service)DataGrid_Main.SelectedItem; lbl_Serv_mnt.Text = "ماه سرویس:" + res.date; lbl_Serv_name.Text = "نام دانش آموز:" + res.Name; lbl_Money.Text = "مبلغ قرارداد:" + res.Price; FinalPayment.ShowUsingLinearAnimation(milliSeconds: 250); } else { MessageBox.Show("هیچ سرویسی انخاب نشده است"); } }
public async Task <IActionResult> AutoCreate(FinalPayment finalPayment) { var customerId = HttpContext.Session.GetInt32("customerId"); if (ModelState.IsValid) { Payment payment = new Payment() { CustomerId = Convert.ToInt32(customerId), PaymentDate = finalPayment.PaymentDate, Amount = finalPayment.Amount, Method = finalPayment.Method }; return(RedirectToAction("FinalReport", payment)); } //ViewData["CustomerId"] = new SelectList(_context.Customer, "id", "Address", payment.CustomerId); else { return(View()); } }
private void BTN_CAN_Click(object sender, RoutedEventArgs e) { FinalPayment.HideUsingLinearAnimation(milliSeconds: 250); App.Navigator.Navigate(new MyService(driver)); }