Ejemplo n.º 1
0
 private void btnDetailsRdv_Click(object sender, RoutedEventArgs e)
 {
     if (planningGrid.SelectedIndex > -1)
     {
         Rdv        rdv            = (Rdv)planningGrid.SelectedItem;
         RdvDetails PageDetailsRdv = new RdvDetails(rdv);
         PageDetailsRdv.Show();
     }
 }
Ejemplo n.º 2
0
 private void getRdvInfos(Rdv rdv)
 {
     typeRdv.Content        = rdv.typeRdv;
     infosC.Content         = rdv.nomClient + " " + rdv.prenomClient;
     dateRdv.Content        = rdv.dateRdv;
     intituleRdv.Content    = rdv.libelleRdv;
     descriptionRdv.Content = rdv.descripRdv;
     planRdv.Content        = rdv.adrClient;
     mailC.Content          = rdv.mailClient;
     telC.Content           = rdv.telClient;
 }
Ejemplo n.º 3
0
        public void RecupRdvFiltre(string _Filtre, int _IDUser, List <Rdv> _ListeRdv)
        {
            _ListeRdv.Clear();

            string reqRecupRdv = "SELECT i.Nom, i.Prenom, i.Mail, i.Adresse, i.Phone, b.Creneau, rdv.Libelle, rdv.Description, rdv.PlanAcces, typesrdv.Libelle as typerdv FROM interlocuteurs as i, bloquer as b, rdv, qualifier as q, typesrdv WHERE i.IDInterlocuteur = q.IDInterlocuteur AND rdv.IDRdv = q.IDRdv AND b.IDRdv = q.IDRdv AND rdv.TypeRdv = typesrdv.IDTypeRDV AND q.IDUser=@IDUser AND b.Creneau LIKE @Date";

            MySqlConnection connexion = new MySqlConnection(CreateConString());

            try
            {
                connexion.Open();
                MySqlCommand cmdRecupRdv = new MySqlCommand(reqRecupRdv, connexion);

                cmdRecupRdv.Parameters.AddWithValue("@IDUser", _IDUser);
                _Filtre += "%";
                cmdRecupRdv.Parameters.AddWithValue("@Date", _Filtre);

                MySqlDataReader reader = cmdRecupRdv.ExecuteReader();
                if (reader.HasRows)
                {
                    while (reader.Read())
                    {
                        string _Nom     = reader[0].ToString();
                        string _Prenom  = reader[1].ToString();
                        string _Mail    = reader[2].ToString();
                        string _Adresse = reader[3].ToString();
                        string _Tel     = reader[4].ToString();
                        string _Date    = reader[5].ToString();
                        string _LblRdv  = reader[6].ToString();
                        string _Descri  = reader[7].ToString();
                        string _Plan    = reader[8].ToString();
                        string _Type    = reader[9].ToString();

                        Rdv rdv = new Rdv(_Nom, _Prenom, _Mail, _Adresse, _Tel, _Date, _LblRdv, _Descri, _Plan, _Type);
                        _ListeRdv.Add(rdv);
                    }
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (connexion.State == ConnectionState.Open)
                {
                    connexion.Close();
                }
            }
        }
Ejemplo n.º 4
0
 public RdvDetails(Rdv rdv)
 {
     InitializeComponent();
     getRdvInfos(rdv);
 }