Esempio n. 1
0
        private Details_Round GetDetailsRoundsV(IDataReader rd)
        {
            Details_Round dr = new Details_Round();

            
            dr.Id = Convert.ToInt32(rd["Id"].ToString());
            dr.Montant_Jour = Convert.ToDecimal(rd["Montant_Jour"].ToString());
            dr.Devise = rd["Devise"].ToString();
            dr.Ecart_Jour = Convert.ToInt32(rd["Ecart_Jour"].ToString());
            dr.Limite = Convert.ToInt32(rd["Limite"].ToString());
            dr.Frais_Adhesion = Convert.ToDecimal(rd["Frais_Adhesion"].ToString());
            dr.Cas = Convert.ToDecimal(rd["Cas_Social"].ToString());
            dr.Retenue = Convert.ToDecimal(rd["Retenue_Remboursement"].ToString());
            return dr;
        }
Esempio n. 2
0
        public void Enregistrer(Details_Round detail)
        {
            if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed)
                ImplementeConnexion.Instance.Conn.Open();
            using (IDbCommand cmd=ImplementeConnexion.Instance.Conn.CreateCommand())
            {
                cmd.CommandText = "INSERT_DETAIL_ROUND";
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@id", 4, DbType.Int32, Id));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@ecart", 4, DbType.Int32, Ecart_Jour));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@montant", 20, DbType.Decimal, Montant_Jour));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@devise", 20, DbType.String, Devise));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@limite", 4, DbType.Int32, Limite));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@frais", 20, DbType.Decimal, Frais_Adhesion));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@cas", 20, DbType.Decimal, Cas));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@retenue", 20, DbType.Decimal, Retenue));
                cmd.Parameters.Add(Parametre.Instance.AjouterParametre(cmd, "@usersession", 30, DbType.String, UserSession));

                cmd.ExecuteNonQuery();

                MessageBox.Show("Enregistrement reussie", "Save", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }