private void btnvert_Click(object sender, RoutedEventArgs e) { DAL.CommandeDAO daoc = new DAL.CommandeDAO(); lblnumcmd.Content = id; c = daoc.getById(id); lbldatee.Content = c.datecommande; lblserveur.Content = c.idserveur; lblnumtab.Content = c.NumTable; lbltotal.Content = c.prixtotal; lblDate.Content = DateTime.Now.ToShortDateString(); lbldatee.Content = DateTime.Now.ToShortDateString(); System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.Tick += timer_Tick; timer.Start(); txtEspece.Clear(); }
private void btnCredit_Click(object sender, RoutedEventArgs e) { Commande cm = new Commande(); DAL.CommandeDAO daoc = new DAL.CommandeDAO(); DAL.ServeurDAO daos = new DAL.ServeurDAO(); Serveur s = new Serveur(); s = daos.getById(c.idserveur); EnregCommeCredit credit = new EnregCommeCredit(); c = daoc.getById(id); decimal sum = c.prixtotal; credit.montant.Text = c.prixtotal.ToString(); credit.serv.Content = s.Nom_Serveur; credit.setcmd(id); credit.ShowDialog(); }
private void btnpayer_Click(object sender, RoutedEventArgs e) { Layouts.TK_et_FK t = new TK_et_FK(id); t.Show(); this.Close(); Commande c = new Commande(); DAL.CommandeDAO daoc = new DAL.CommandeDAO(); c = daoc.getById(id); DataSet DSreport = new DSreport(); DSreport.Reset(); List <Commande> lstCom = new List <Commande>(); lstCom = daoc.getAll(); g.dataGrid.DataContext = lstCom; g.PerformRefresh(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { Keyboard.Focus(txtEspece); DAL.CommandeDAO daoc = new DAL.CommandeDAO(); DAL.PayementDAO daop = new DAL.PayementDAO(); lblnumcmd.Content = id; c = daoc.getById(id); decimal sum = c.prixtotal - daop.getPayementByCmdId(id); lbldatee.Content = c.datecommande; lblserveur.Content = c.idserveur; lblnumtab.Content = c.NumTable; lbltotal.Content = sum; lblDate.Content = DateTime.Now.ToShortDateString(); lbldatee.Content = DateTime.Now.ToShortDateString(); System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.Tick += timer_Tick; timer.Start(); txtEspece.Text = "" + sum; }