Пример #1
0
 public Mission(int idMission, int initCodeEntreprise, MotifFin motif, Qualification qualif, Niveau niv, Consultant consult, DateTime dateOuv, DateTime? dateFin, decimal? remu, string precis, sbyte? duree)
 {
     IdMission = idMission;
     CodeEntreprise = initCodeEntreprise;
     Motif = motif;
     QualificationDemandee = qualif;
     NiveauDemande = niv;
     Consult = consult;
     DateOuverture = dateOuv;
     DateFin = dateFin;
     RemunerationProposee = remu;
     Precisions = precis;
     Duree = duree;
 }
Пример #2
0
        public static List<MotifFin> GetAllMotif()
        {
            List<MotifFin> oMotif = new List<MotifFin>();

            using (SqlConnection sqlConnect = GetConnection())
            {
                using (SqlCommand sqlCde = new SqlCommand())
                {
                    sqlCde.Connection = sqlConnect;
                    string strsql = "GetAllMotif";

                    try
                    {
                        sqlCde.CommandType = CommandType.StoredProcedure;
                        sqlCde.CommandText = strsql;
                        SqlDataReader sqlRdr = sqlCde.ExecuteReader();
                        while (sqlRdr.Read())
                        {
                            MotifFin mot = new MotifFin()
                            {
                                IdMotif = (sbyte)sqlRdr.GetByte(0),
                                LibelleMotif = sqlRdr.GetString(1)
                            };
                            oMotif.Add(mot);

                        }
                        sqlRdr.Close();
                        return oMotif;

                    }
                    catch (SqlException ex)
                    {
                        throw new DaoExceptionFinApplication("Chargement des qualifications impossible, l'application va se fermer: \n" + ex.Message, ex);
                    }
                }
            }
        }