Beispiel #1
0
        public static System.Collections.Generic.List <KursusListe> GetKursusListByKursusDag(int KursusDagID)
        {
            System.Collections.Generic.List <KursusListe> result = new System.Collections.Generic.List <KursusListe>();
            int      ID = -1;
            DBAccess db = new DBAccess();

            db.AddInt("KursusDagID", KursusDagID);

            SqlDataReader dr = default(SqlDataReader);

            try
            {
                dr = (System.Data.SqlClient.SqlDataReader)(db.ExecuteReader(_SQLSelectByKursusDag));
                if (dr.HasRows)
                {
                    while (dr.Read())
                    {
                        KursusListe kd = new KursusListe();
                        kd.KursusDeltagerID = System.Convert.ToInt32(dr.DBtoInt("KursusDeltagerID"));
                        kd.KursusDagID      = System.Convert.ToInt32(dr.DBtoInt("KursusDagID"));
                        kd.Status           = (RescueTekniq.BOL.KursusStatusEnum)(dr.DBtoInt("KursusListeStatus"));
                        result.Add(kd);
                    }
                }
                dr.Close();
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            return(result);
        }
Beispiel #2
0
        private static void Populate(SqlDataReader dr, KursusListe c)
        {
            var with_1 = c;

            with_1.KursusDagID      = System.Convert.ToInt32(dr.DBtoInt("KursusDagID"));
            with_1.KursusDeltagerID = System.Convert.ToInt32(dr.DBtoInt("KursusDeltagerID"));
            with_1.Status           = (RescueTekniq.BOL.KursusStatusEnum)(dr.DBtoInt("Status"));
            PopulateStandard(dr, c);
        }
Beispiel #3
0
        private static void AddParms(ref DBAccess db, KursusListe c)
        {
            var with_1 = c;

            db.AddInt("KursusDagID", with_1.KursusDagID);
            db.AddInt("KursusDeltagerID", with_1.KursusDeltagerID);
            db.AddInt("Status", (System.Int32)with_1.Status);
            AddParmsStandard(db, c);
        }