Ejemplo n.º 1
0
        protected override void Page_Load(object sender, System.EventArgs e)
        {
            DataAccess.DataSetDa dsd = new DataSetDa();
            DataSet AllDataSets      = dsd.GetDatasets();
            Dataset pda = new Dataset();

            DataSetsList.DataSource     = AllDataSets;
            DataSetsList.DataTextField  = "DataSetName";
            DataSetsList.DataValueField = "DataSetId";
            DataSetsList.DataBind();
            //ResultsPanel.Visible = false;
            //AddPanel.Visible = true;

            //DataSet dataset = new DataSet();
            //if (Page.IsPostBack && SearchField.Text != "")
            //{
            //    DataSetDa Inst = new DataSetDa();
            //    DataRowCollection InstIds = Inst.GetDatasets().Tables[0].Rows;


            //    Caisis.Controller.SearchController sc = new Caisis.Controller.SearchController();
            //    string search = SearchField.Text;
            //    foreach (DataRow DRow in InstIds)
            //    {
            //        DataSet local;
            //        CacheManager.ResetDatasetSqlCache();
            //        int dsID = int.Parse(DRow[0].ToString());
            //        string datasetSQL = CacheManager.GetDatasetSQL(dsID);
            //        local = sc.FindPatient(search, datasetSQL);
            //        dataset.Merge(local);
            //    }
            //    if (dataset.Tables[0].Rows.Count > 0)
            //    {
            //        AddPanel.Visible = false;
            //        ResultsPanel.Visible = true;
            //        ResultsGrid.DataSource = dataset;
            //        ResultsGrid.DataBind();
            //    }
            //}
            //// Put user code to initialize the page here
            //DataSetDa datasets = new DataSetDa();
            //PatientInstitutionDa pi = new PatientInstitutionDa();
            //PatientInstitution pio = new Caisis.BOL.PatientInstitution();
            //DataRow row = pio.Tables[PatientInstitution.Table_PatientInstitutions].NewRow();
            //DataSet ds = datasets.GetDatasets();
            //DataSetsList.DataSource = ds;
            //DataSetsList.DataTextField = "DatasetName";
            //DataSetsList.DataValueField = "DatasetId";
            //DataSetsList.DataBind();
            //			if (PatientID.Text != "" && DataSetsList.SelectedValue != null)
            //			{
            //				row[PatientInstitution.InstitutionId] = DataSetsList.SelectedValue;
            //				row[PatientInstitution.PatientId] = PatientID.Text;
            //				row[PatientInstitution.EnteredTime] = System.DateTime.Now;
            //
            //				//int i = pi.InsertRecord(row);
            //			}
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the instance configuration - collection of data sets represented as the <see cref="DataSetConfiguration"/>.
        /// </summary>
        /// <param name="descriptor">The descriptor.</param>
        /// <returns>IEnumerable&lt;IInstanceConfiguration&gt;.</returns>
        public DataSetConfiguration GetInstanceConfiguration(NodeDescriptor descriptor)
        {
            DataSetConfiguration _node = DataSetsList.Where <DataSetConfiguration>(x => x.Root.CreateWrapper().CompareTo(descriptor) == 0).FirstOrDefault <DataSetConfiguration>();

            if (_node == null)
            {
                _node = DataSetConfiguration.Create(descriptor);
            }
            return(_node);
        }