Ejemplo n.º 1
0
        private void PopulateAllIndividualNames()
        {
            var individualManager = new IndividualManager();
            var table             = individualManager.GetIndividuals();

            DropExistingIndividuals.DataSource     = table;
            DropExistingIndividuals.DataTextField  = table.individual_nameColumn.ColumnName;
            DropExistingIndividuals.DataValueField = table.individual_nameColumn.ColumnName;
            DropExistingIndividuals.DataBind();
        }
Ejemplo n.º 2
0
        protected void AddNewIndividual(List <string> names)
        {
            var individualManager = new IndividualManager();
            var tableI            = individualManager.GetIndividuals();
            var table             = _dal.GetInvestigatedIndividuals(_investigationId);

            foreach (var name in names)
            {
                if (tableI.FindByindividual_name(name) == null)
                {
                    tableI.AddindividualRow(name, true);
                    individualManager.Save(tableI);
                }
                var existing = table.FindByindividual_nameinvestigation_id(name, _investigationId);
                if (existing != null)
                {
                    continue;
                }
                table.Addinvestigated_individualRow(name, _investigationId);
                _dal.Save(table);
            }
        }