public GestionProjetView(bool creation)
 {
     siCreation = creation;
     _projet = new Projet();
     _projet.ID = Requete.dernierId();
     _projet.dateun = DateTime.Now.ToString();
     _projet.etat = "SIM";
     InitializeComponent();
     DataContext = this;
     AutoriserChampDroit(rboSIM,null);
     dtDateFin.DisplayDateStart = dtDateDebut.SelectedDate;
     gridEmployeProjet.Visibility = Visibility.Hidden;
     lblEmployesProjet.Visibility = Visibility.Hidden;
     rboEND.IsEnabled = false;
     rboABD.IsEnabled = false;
     rboRessGen.IsChecked = true;
     txtDateTerminerOuAbandonner.Visibility = Visibility.Hidden;
     canvas.Visibility = Visibility.Hidden;
 }
Beispiel #2
0
 private void CorpsProjet(ref PdfPage page, ref XTextFormatter formatter, ref XFont font, XRect layoutRectangle, ref int height, Projet projet, int tC, int tHP, int tHT)
 {
     layoutRectangle = new XRect(30, height += 15, page.Width, page.Height);
     formatter.DrawString(projet.nom, font, XBrushes.Black, layoutRectangle);
     layoutRectangle = new XRect(260, height, page.Width, page.Height);
     formatter.DrawString(String.Format("{0,"+tC+"}",projet.prixSimulation.ToString()) + "$", font, XBrushes.Black, layoutRectangle);
     layoutRectangle = new XRect(360, height, page.Width, page.Height);
     formatter.DrawString(String.Format("{0,"+tHP+"}",projet.nbHeuresSimule.ToString()), font, XBrushes.Black, layoutRectangle);
     layoutRectangle = new XRect(470, height, page.Width, page.Height);
     formatter.DrawString(String.Format("{0,"+tHT+"}",projet.nbHeuresReel.ToString()), font, XBrushes.Black, layoutRectangle);
     layoutRectangle = new XRect(581, height, page.Width, page.Height);
     formatter.DrawString(String.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(projet.dateun)), font, XBrushes.Black, layoutRectangle);
     layoutRectangle = new XRect(697, height, page.Width, page.Height);
     formatter.DrawString((projet.datedeux != "Indéfini"?String.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(projet.datedeux)) : "Indéfini"), font, XBrushes.Black, layoutRectangle);
 }