/*
         * private async Task<Examen> GetExamenByIdAwait(String idExamen)
         * {
         *  IExamenBl examenBl = new ExamenBl();
         *  return examenBl.GetExamenById(Guid.Parse(idExamen));
         * }
         */

        #endregion
        /// <summary>
        /// Descripción: Carga la informacion y configura los controles de la pagina.
        /// Author: Terceros.
        /// Fecha Creacion: 01/01/2017.
        /// Fecha Modificación: 02/02/2017.
        /// Modificación: Se agregaron comentarios, funcion no utilizada.
        /// </summary>
        public void LoadDefaultData()
        {
            materialList = new List <MaterialVd>();
            if (this.Session["materialListBS"] != null)
            {
                materialList = (List <MaterialVd>) this.Session["materialListBS"];
            }
            else
            {
                List <int> idTipoMuestraList = new List <int>();

                IMaterialBl materialBl = new MaterialBl();
                idTipoMuestraList.Add(Convert.ToInt32(TipoMuestraSangreId));

                foreach (Material material in materialBl.GetMaterialesByIdTipoMuestraIdPresentacion(TipoMuestraSangreId, TipoPresentacionBolsa))
                {
                    materialList.Add(new MaterialVd {
                        material = material, idCmbMaterial = material.idMaterial, textoCmbMaterial = material.Presentacion.glosa + " " + material.Reactivo.glosa + " " + material.volumen.ToString() + "ml"
                    });
                }

                this.Session["materialListBS"] = materialList;
            }

            proyectosBS = new List <Proyecto>();
            if (this.Session["proyectosBS"] != null)
            {
                proyectosBS = (List <Proyecto>) this.Session["proyectosBS"];
            }
            else
            {
                IProyectoBl proyectoBl = new ProyectoBl();
                proyectosBS = proyectoBl.GetProyectosBS();
                this.Session["proyectosBS"] = proyectosBS;
            }

            List <SelectListItem> proyectos = new List <SelectListItem>();

            foreach (Proyecto item in proyectosBS)
            {
                proyectos.Add(new SelectListItem {
                    Text = item.Nombre, Value = item.IdProyecto.ToString()
                });
            }

            ViewBag.proyectos    = proyectos;
            ViewBag.materialList = materialList;
        }