示例#1
0
 private void btnSaveDossier_Click(object sender, EventArgs e)
 {
     try
     {
         if (!bln)
         {
             operation.inserts();
             MessageBox.Show("Enregistrement éffectué", "Enregistrement", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             if (bsrc.DataSource != null)
             {
                 clsoperation_laboratoire o = (clsoperation_laboratoire)bsrc.Current;
                 new clsoperation_laboratoire().update(o);
                 MessageBox.Show("Modification effectuée!", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Echec de la mise à jour" + ex.Message, "Mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     try
     {
         bsrc.DataSource = clsMetier.GetInstance().getAllClsoperation_laboratoire2(clsDoTraitement.idMaladeDossierPre, "Non cloturé non payé", "Payé non cloturé");
     }
     catch (Exception)
     {
         MessageBox.Show("Erreur lors de l'actualisation", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
示例#2
0
 private void New()
 {
     operation = new clsoperation_laboratoire();
     bln       = false;
     bindingclsOperation();
     txtIdMalade.Text = clsDoTraitement.idMaladeDossierPre.ToString();
 }
示例#3
0
 private void btnCloturer_Click(object sender, EventArgs e)
 {
     try
     {
         if (((clsoperation_laboratoire)lstDossierEncCours.SelectedItem).Etatpaiement.ToString() == "Non cloturé non payé")
         {
             txtetatPaiement.Text = "Cloturé non payé";
             clsoperation_laboratoire o = (clsoperation_laboratoire)bsrc.Current;
             new clsoperation_laboratoire().update(o);
             MessageBox.Show("Dossier Cloturé avec succès!", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information);
             getObject();
             refreshOperation();
             refreshLabo();
         }
         else
         {
             txtetatPaiement.Text = "Cloturé";
             clsoperation_laboratoire o = (clsoperation_laboratoire)bsrc.Current;
             new clsoperation_laboratoire().update(o);
             MessageBox.Show("Dossier Cloturé avec succès!", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information);
             getObject();
             refreshOperation();
             refreshLabo();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ">>>" + "Erreur Inentendue!", "Cloture", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
示例#4
0
        private void btnSaveDossier_Click(object sender, EventArgs e)
        {
            try
            {
                if (!bln)
                {
                    operation.inserts();
                    MessageBox.Show("Enregistrement éffectué", "Enregistrement", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    if (bsrc.DataSource != null)
                    {
                        clsoperation_laboratoire o = (clsoperation_laboratoire)bsrc.Current;
                        new clsoperation_laboratoire().update(o);
                        MessageBox.Show("Modification effectuée!", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Echec de la mise à jour" + ex.Message, "Mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            refreshOperation();
            refreshLabo();
        }
示例#5
0
 private void New()
 {
     operation = new clsoperation_laboratoire();
     bln       = false;
     bindingclsOperation();
     txtIdMalade.Text = malade.Id.ToString();
 }
示例#6
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result = MessageBox.Show("Voulez - vous vraiment supprimer cet enregistrement ?", "Suppression", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             if (bsrc.DataSource != null)
             {
                 clsoperation_laboratoire a = (clsoperation_laboratoire)bsrc.Current;
                 new clsoperation_laboratoire().delete(a);
                 MessageBox.Show("Suppression éffectuée", "Suppression", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.refreshOperation();
                 btnDelete.Enabled = false;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Echec de la suppression " + ex.Message, "Suppression", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
示例#7
0
 private void btnRestauration_Click(object sender, EventArgs e)
 {
     try
     {
         if (((clsoperation_laboratoire)lstArchive.SelectedItem).Etatpaiement.ToString() == "Cloturé non payé")
         {
             clsoperation_laboratoire o = new clsoperation_laboratoire();
             o.Id_examen    = ((clsoperation_laboratoire)lstArchive.SelectedItem).Id_examen;
             o.Id_malade    = ((clsoperation_laboratoire)lstArchive.SelectedItem).Id_malade;
             o.Id           = ((clsoperation_laboratoire)lstArchive.SelectedItem).Id;
             o.Date         = ((clsoperation_laboratoire)lstArchive.SelectedItem).Date;
             o.Etatpaiement = "Non cloturé non payé";
             new clsoperation_laboratoire().update(o);
             MessageBox.Show("Dossier restauré avec succès!", "Restauration Dossier", MessageBoxButtons.OK, MessageBoxIcon.Information);
             getObject();
             refreshOperation();
             refreshLabo();
         }
         else
         {
             clsoperation_laboratoire o = new clsoperation_laboratoire();
             o.Id_examen    = ((clsoperation_laboratoire)lstArchive.SelectedItem).Id_examen;
             o.Id_malade    = ((clsoperation_laboratoire)lstArchive.SelectedItem).Id_malade;
             o.Id           = ((clsoperation_laboratoire)lstArchive.SelectedItem).Id;
             o.Date         = ((clsoperation_laboratoire)lstArchive.SelectedItem).Date;
             o.Etatpaiement = "Non cloturé payé";
             new clsoperation_laboratoire().update(o);
             getObject();
             refreshOperation();
             refreshLabo();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ">>>" + "Erreur Inentendue!", "Cloture", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }