Ejemplo n.º 1
0
        public struMencion[] getMencionesForEdit(System.Byte Id)
        {
            clsMencion Mencion     = new clsMencion();
            DataTable  dtMenciones = Mencion.getLista();

            Mencion = null;
            clsTemaProyecto TemaProyecto = new clsTemaProyecto();

            clsTemaProyecto.struMencion[] MisMenciones = TemaProyecto.getMenciones(Id);
            TemaProyecto = null;
            struMencion[] result = new struMencion[dtMenciones.Rows.Count];
            for (int x = 0; x <= (dtMenciones.Rows.Count - 1); x++)
            {
                result[x].Id     = System.Convert.ToByte(dtMenciones.Rows[x]["Id"]);
                result[x].Nombre = System.Convert.ToString(dtMenciones.Rows[x]["Nombre"]);
                for (int y = 0; y <= (MisMenciones.Length - 1); y++)
                {
                    if (System.Convert.ToByte(dtMenciones.Rows[x]["Id"]) == MisMenciones[y].Id)
                    {
                        result[x].Selected = true;
                        break;
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        public struMencion[] getMencionesForEdit(System.Byte Id)
        {
            clsMencion Mencion     = new clsMencion();
            DataTable  dtMenciones = Mencion.getLista();

            Mencion = null;
            clsCurso Curso = new clsCurso();

            clsCurso.struMencion[] MisMenciones = Curso.getMenciones(Id);
            Curso = null;
            struMencion[] result = new struMencion[dtMenciones.Rows.Count];
            for (int x = 0; x <= (dtMenciones.Rows.Count - 1); x++)
            {
                result[x].Id     = System.Convert.ToByte(dtMenciones.Rows[x]["Id"]);
                result[x].Nombre = System.Convert.ToString(dtMenciones.Rows[x]["Nombre"]);
                for (int y = 0; y <= (MisMenciones.Length - 1); y++)
                {
                    System.Diagnostics.Debug.WriteLine("Id: " + result[x].Id + ", " + result[x].Nombre + ": " + System.Convert.ToByte(dtMenciones.Rows[x]["Id"]) + " = " + MisMenciones[y].Id);
                    if (System.Convert.ToByte(dtMenciones.Rows[x]["Id"]) == MisMenciones[y].Id)
                    {
                        result[x].Selected = true;
                        break;
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 3
0
 public DataView getListaMenciones()
 {
     try
     {
         clsMencion Mencion     = new clsMencion();
         DataView   dvMenciones = Mencion.getLista().DefaultView;
         Mencion = null;
         return(dvMenciones);
     }
     catch (System.Exception Ex)
     {
         throw new System.Exception("Imposible recuperar la lista de las menciones.", Ex);
     }
 }
Ejemplo n.º 4
0
        public struMencion[] getMencionesForNuevo()
        {
            clsMencion Mencion     = new clsMencion();
            DataTable  dtMenciones = Mencion.getLista();

            Mencion = null;
            struMencion[] result = new struMencion[dtMenciones.Rows.Count];
            for (int x = 0; x <= (dtMenciones.Rows.Count - 1); x++)
            {
                result[x].Id       = System.Convert.ToByte(dtMenciones.Rows[x]["Id"]);
                result[x].Nombre   = System.Convert.ToString(dtMenciones.Rows[x]["Nombre"]);
                result[x].Selected = true;
            }
            return(result);
        }