示例#1
0
        public void Enregistrer(Cotisation cot)
        {
            if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed)
            {
                ImplementeConnexion.Instance.Conn.Open();
            }
            using (IDbCommand cmd = ImplementeConnexion.Instance.Conn.CreateCommand())
            {
                cmd.CommandText = "INSERT_COTISATION";
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@id", 4, DbType.Int32, Id));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@ref_inscription", 4, DbType.Int32, RefInscription));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@ref_semaine", 4, DbType.Int32, RefSemaine));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@date_concerne", 20, DbType.Date, DateConcernee));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@ref_frais", 4, DbType.Int32, RefFrais));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@montant", 4, DbType.Decimal, Convert.ToDecimal(Montant)));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@cas", 4, DbType.Int32, Convert.ToDecimal(Cas)));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@usersession", 30, DbType.String, UserSession));

                cmd.ExecuteNonQuery();

                //MessageBox.Show("Enregistrement reussie", "Save", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#2
0
        private Cotisation GetDetailCotisation(IDataReader dr)
        {
            Cotisation cot = new Cotisation();

            i = i + 1;

            cot.Num            = i;
            cot.Id             = Convert.ToInt32(dr["Id"].ToString());
            cot.DateCotisation = Convert.ToDateTime(dr["Date_Cotisation"].ToString());
            cot.DateConcernee  = Convert.ToDateTime(dr["Date_Concernee"].ToString());
            cot.Montant        = dr["Montant"].ToString();
            cot.Mont           = Convert.ToDouble(dr["Mont"].ToString());
            cot.RefInscription = Convert.ToInt32(dr["IdInscription"].ToString());
            cot.RefRound       = Convert.ToInt32(dr["IdRound"].ToString());
            cot.Matricule      = dr["Matricule"].ToString();

            cot.Nom         = dr["Nom"].ToString();
            cot.Postnom     = dr["Postnom"].ToString();
            cot.Prenom      = dr["Prenom"].ToString();
            cot.Sexe        = dr["Sexe"].ToString();
            cot.RefSemaine  = Convert.ToInt32(dr["IdSemaine"].ToString());
            cot.RefFrais    = Convert.ToInt32(dr["IdFrais"].ToString());
            cot.Designation = dr["Designation"].ToString();

            return(cot);
        }
示例#3
0
        private Cotisation GetDetailDettes(IDataReader dr)
        {
            Cotisation cot = new Cotisation();

            i = i + 1;

            cot.Num            = i;
            cot.RefInscription = Convert.ToInt32(dr["IdInscription"].ToString());
            cot.Matricule      = dr["Matricule"].ToString();
            cot.Nom            = dr["Nom_Complet"].ToString();
            cot.Sexe           = dr["Sexe"].ToString();


            return(cot);
        }