Esempio n. 1
0
        internal static void CrearItemLibre(ItemLibre itemLibre, int idReunion)
        {
            try
            {
                DbCommand cmd = db.GetStoredProcCommand("IBVD_AgregarItemLibre");
                db.AddInParameter(cmd, "IdReunion", DbType.Int32, idReunion);
                db.AddInParameter(cmd, "Index", DbType.Int32, itemLibre.Index);
                db.AddInParameter(cmd, "Titulo", DbType.String, itemLibre.Titulo);
                db.AddInParameter(cmd, "Detalle", DbType.String, itemLibre.Texto);

                db.ExecuteNonQuery(cmd);
            }
            catch (Exception ex)
            {
                throw new DataAccessException("Error al crear el item libre enla base de datos: ReunionesMapper.CrearItemLibre", ex);
            }
        }
Esempio n. 2
0
        private static IList <ItemLibre> BuildItemLibres(DataRowCollection dataRowCollection)
        {
            IList <ItemLibre> items = new List <ItemLibre>();

            foreach (DataRow row in dataRowCollection)
            {
                int    id        = (int)row["Id"];
                int    reunionId = (int)row["IdReunion"];
                string titulo    = (string)row["Titulo"];
                string detalle   = (string)row["Detalle"];

                ItemLibre item = new ItemLibre(id, reunionId, titulo, detalle);
                items.Add(item);
            }

            return(items);
        }