Example #1
0
        private Remboursement GetDetailsRecouvrement(IDataReader dr)
        {
            Remboursement rem = new Remboursement();

            i = i + 1;

            rem.Num     = i;
            rem.Code    = dr["Code"].ToString();
            rem.Montant = Convert.ToDouble(dr["Montant"].ToString());
            rem.Client  = dr["Noms"].ToString();
            rem.Sexe    = dr["Sexe"].ToString();
            rem.Phone   = dr["Telephone"].ToString();


            return(rem);
        }
Example #2
0
        public void Enregistrer(Remboursement remb)
        {
            if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed)
            {
                ImplementeConnexion.Instance.Conn.Open();
            }
            using (IDbCommand cmd = ImplementeConnexion.Instance.Conn.CreateCommand())
            {
                cmd.CommandText = "INSERT_REMBOURSEMENT";
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@id", 5, DbType.Int32, remb.Id));
                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@code", 20, DbType.String, remb.Code));
                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@montant", 50, DbType.Double, remb.Montant));
                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@observation", 50, DbType.String, remb.Observation));
                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@refcredit", 5, DbType.Int32, remb.RefCredit));
                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@date", 20, DbType.Date, remb.DateRemboursement));

                cmd.ExecuteNonQuery();
            }
        }
Example #3
0
        private Remboursement GetDetails(IDataReader dr)
        {
            Remboursement rem = new Remboursement();

            i = i + 1;

            rem.Num               = i;
            rem.Id                = Convert.ToInt32(dr["Id"].ToString());
            rem.Code              = dr["Code"].ToString();
            rem.Montant           = Convert.ToDouble(dr["Montant"].ToString());
            rem.DateRemboursement = Convert.ToDateTime(dr["Date_Remboursement"].ToString());
            rem.Observation       = dr["Observation"].ToString();
            rem.CodeCredit        = dr["Code_Credit"].ToString();
            rem.MontantR          = dr["Montant_Restant"].ToString();
            rem.CodeClient        = dr["Code_Client"].ToString();
            rem.Client            = dr["Client"].ToString();
            rem.Sexe              = dr["Sexe"].ToString();
            rem.Phone             = dr["Telephone"].ToString();


            return(rem);
        }