private void BtndeleteDateR_Click(object sender, RoutedEventArgs e) { CNLController CNLC = new CNLController(); CNLC.DeleteDateReserve(inputDatereserve.Text, inputEtat.Text, NumPayement); inputDatereserve.Text = string.Empty; }
private void BtnValiderverssement_Click(object sender, RoutedEventArgs e) { if (decimal.Parse(inputMontantCNL.Text) <= Reste) { if (inputNumDeci.Text != "" && inputDateDeci.Text != "" && inputMontantCNL.Text != "" && inputDateConserv.Text != "") { CNLController CNLC = new CNLController(); CNLC.ValidationCNL(NumPayement, inputNumDeci.Text, inputDateDeci.Text, decimal.Parse(inputMontantCNL.Text), inputDateConserv.Text); msh.ExecuteQuery("update payement set MontantVerse=MontantVerse+" + decimal.Parse(inputMontantCNL.Text) + ",Reste=MontantTotal-MontantVerse where NumPayement='" + NumPayement + "'"); string query = "select * from payement where NumPayement='" + NumPayement + "'"; MySqlDataReader rdr = null; MySqlConnection con = null; MySqlCommand cmd = null; con = new MySqlConnection(Database.ConnectionString()); con.Open(); cmd = new MySqlCommand(query); cmd.Connection = con; rdr = cmd.ExecuteReader(); bool oneTime = true; while (rdr.Read()) { AddPayement.inputprixtotal.Text = rdr["MontantTotal"].ToString(); AddPayement.inputprixpayer.Text = rdr["MontantVerse"].ToString(); AddPayement.inputReste.Text = rdr["Reste"].ToString(); } MainWindow mainWindows = (MainWindow)System.Windows.Application.Current.Windows[0]; mainWindows.Frame.NavigationUIVisibility = NavigationUIVisibility.Hidden; mainWindows.Frame.Navigate(AddPayement); mainWindows.currentWindow.Text = "Payement"; mainWindows.Activate(); this.Close(); } else { System.Windows.MessageBox.Show("Veuillez remplir les champs suivants: Num Décision, Date Décision, Montant CNL , Date Conservation"); } } else { System.Windows.MessageBox.Show("Le montant CNL est supérieux au montant reste à payé du bien veuillez introduire une valeur inferieur"); } }
private void BtnsaveEtat_Click(object sender, RoutedEventArgs e) { CNLController CNLC = new CNLController(); CNLC.UpdateEtat(inputEtat.Text, NumPayement); }
private void BtnsaveDateR_Click(object sender, RoutedEventArgs e) { CNLController CNLC = new CNLController(); CNLC.updateDateReserve(inputDatereserve.Text, inputEtat.Text, NumPayement); }
private void BtnAddCNL_Click(object sender, RoutedEventArgs e) { CNLController CNLC = new CNLController(); CNLC.AjouterCNL(NumPayement, inputEtat.Text); }
private void BtnAnnuleCNL_Click(object sender, RoutedEventArgs e) { CNLController CNLC = new CNLController(); CNLC.AnnulerCNL(NumPayement); }