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); // } }
protected void ShowDatasetList() { RepeaterDiv.Visible = true; AddDatasetsTable.Visible = false; XmlPanel.Visible = false; DataSetDa da = new DataSetDa(); DataSet ds = da.GetDatasets(); rptDatasets.DataSource = ds.Tables[0].DefaultView; rptDatasets.DataBind(); }
override protected void Page_Load(object sender, System.EventArgs e) { base.Page_Load(sender, e); valMsg.Text = ""; datasetMessage.Text = ""; AddBtn.ImageUrl = "../Images/AdminImages/submit.gif"; AddBtn.Width = 65; AddBtn.Height = 21; SelectDatasetName.Attributes.Add("onchange", "this.form." + SelectSubmitted.ClientID + ".value = 'true'; this.form.submit();"); if (Page.IsPostBack) { //check if form is submitted from select box or to update password if (!Request.Form["SelectDatasetName"].Equals("") && Request.Form["SelectSubmitted"] != null && Request.Form["SelectSubmitted"].Equals("true")) { this.ShowGroupSelect(int.Parse(Request.Form["SelectDatasetName"])); } } else { DataSetDa das = new DataSetDa(); DataSet ds = das.GetDatasets(); SelectDatasetName.DataSource = ds.Tables[0].DefaultView; SelectDatasetName.DataValueField = "DatasetId"; SelectDatasetName.DataTextField = "DatasetName"; SelectDatasetName.DataBind(); SelectDatasetName.Items.Insert(0, new ListItem("")); //SelectDatasetTable.Visible = false; //adding new dataset if (Request.QueryString["newDataset"] != null && Request.QueryString["newDataset"].Equals("yes")) { SelectDatasetName.Value = Request.QueryString["datasetId"]; this.ShowGroupSelect(int.Parse(Request.QueryString["datasetId"])); } } } //end page_load