Exemplo n.º 1
0
        private void toolStripButton6_Click(object sender, EventArgs e)
        {

    
            if ((this.listDesTaches.SelectedIndex != -1) && (this.listDesTaches.SelectedIndices.Count != 0))
            {
                if (this.listDesTaches.SelectedIndex != 0)
                {
                    Taches SelectedTache = this.ttab[this.listDesTaches.SelectedIndex];
                    Taches AvantSelectedTache = this.ttab[this.listDesTaches.SelectedIndex - 1];

                    BDGestionAccess2013.SUPPRIME_TACHE(AvantSelectedTache);
                    BDGestionAccess2013.SUPPRIME_TACHE(SelectedTache);
                    BDGestionAccess2013.CREA_TACHE(SelectedTache, AvantSelectedTache.TacheID);
                    BDGestionAccess2013.CREA_TACHE(AvantSelectedTache, SelectedTache.TacheID);               
                    this.MiseAJour();
                }
                    

            }




        }
Exemplo n.º 2
0
        private void CreerButt_Click(object sender, EventArgs e)
        {
            if (!this.ModeModif)
            {
                //this.TacheAcreer.TacheID = null;
                this.TacheAcreer.Titre       = this.titreBox.Text.Replace("'", "''");
                this.TacheAcreer.Description = this.descripBox.Text.Replace("'", "''");
                this.TacheAcreer.Datdeb      = this.dateTimePicker1.Value.ToShortDateString();
                this.TacheAcreer.Datfin      = this.dateTimePicker2.Value.ToShortDateString();
                this.TacheAcreer.Heuredeb    = this.HeureBox.Text;
                this.TacheAcreer.Heurefin    = this.heureBox2.Text;
                this.TacheAcreer.Datcrea     = DateTime.Today.ToShortTimeString();
                this.TacheAcreer.Heurecrea   = DateTime.Now.ToShortTimeString();
                this.TacheAcreer.AuteurId    = 0;                          // defaut
                this.TacheAcreer.DestinatId  = this.destinataireDeLaTache; // defaut
                this.TacheAcreer.Archive     = false;

                if (this.titreBox.Text != "")
                {
                    BDGestionAccess2013.CREA_TACHE(this.TacheAcreer);
                    this.InfoLabCrea.Text = "LA TACHE A ETE CREE";
                }
                else
                {
                    this.CreerButt.BackColor = Color.Red;
                    this.InfoLabCrea.Text    = "DEFINIR UN TITRE POUR LA TACHE";
                }
            }
            else
            {
                if (this.titreBox.Text != "")
                {
                    BDGestionAccess2013.MODIFIE_TACHE(this.TacheCouranteAmodifier);
                    this.InfoLabCrea.Text = "LA TACHE A ETE MODIFIEE";
                }
                else
                {
                    this.CreerButt.BackColor = Color.Red;
                    this.InfoLabCrea.Text    = "DEFINIR UN TITRE POUR LA TACHE";
                }
            }
        }