Esempio n. 1
0
        internal void Fill(CargarDatosContex dataContext, int?p)
        {
            this.p = p ?? 1;

            var query = dataContext.context.Subject.Where(x => x.State != ConstantHelpers.ESTADO.INACTIVO).AsQueryable();

            this.LstRegistros = query.OrderBy(x => x.LastName).ToPagedList(this.p, ConstantHelpers.DEFAULT_PAGE_SIZE);
        }
        public CargarDatosContex CargarDatosContext()
        {
            if (cargarDatoxContext == null)
            {
                cargarDatoxContext = new CargarDatosContex {
                    context = context
                };
            }

            return(cargarDatoxContext);
        }
        internal void Fill(CargarDatosContex dataContext, int?subjectId)
        {
            var subject = dataContext.context.Subject.Find(subjectId);

            if (subject is null)
            {
                return;
            }
            this.Name                     = subject.Name;
            this.LastName                 = subject.LastName;
            this.TimesPregnant            = subject.TimesPregnant;
            this.PlasmaGlucose            = (float)subject.PlasmaGlucose;
            this.DistolicBlood            = (float)subject.DistolicBlood;
            this.TricepsSFT               = (float)subject.TricepsSFT;
            this.SerumInsuline2Hour       = (float)subject.SerumInsuline2Hour;
            this.BodyMassIndex            = (float)subject.BodyMassIndex;
            this.DiabetesPedigreeFunction = (float)subject.DiabetesPedigreeFunction;
            this.Age = subject.Age;
            this.ProbabilityOfDiabetes = subject.ProbabilityOfDiabetes ?? 0;
        }