protected void DDLDIS_Click(object sender, EventArgs e) { String vID = Request.QueryString["id1"]; Hashtable vHashtable = new Hashtable(); vHashtable.Add("EVADIS_DISID", DDLDIS.SelectedValue); dt1 = DBManager.Get(vHashtable, "GET_EVALUATION_DISORDER_ID"); EVA_ID1.DataSource = dt1; EVA_ID1.DataBind(); }
protected void BindGrid() { DataTable dt = (DataTable)ViewState["datagrid"]; EVA_ID1.DataSource = dt; EVA_ID1.DataBind(); for (int j = 0; j < EVA_ID1.Rows.Count; j++) { Label EVA_ID = (Label)EVA_ID1.Rows[j].Cells[2].FindControl("EVA_ID"); EVA_ID.Visible = false; this.EVA_ID1.Columns[3].Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { vATSession = (ATSession)Session["User"]; if (vATSession == null) { Response.Redirect("Default.aspx"); } String vID = Request.QueryString["ID"]; if (!IsPostBack) { dt = new DataTable(); DataColumn NAME = new DataColumn(); NAME.DataType = Type.GetType("System.String"); NAME.ColumnName = "DIS_NAME"; dt.Columns.Add(NAME); DataColumn EVA_NAME = new DataColumn(); EVA_NAME.DataType = Type.GetType("System.String"); EVA_NAME.ColumnName = "EVA_NAME"; dt.Columns.Add(EVA_NAME); DataColumn EVA_ID = new DataColumn(); EVA_ID.DataType = Type.GetType("System.String"); EVA_ID.ColumnName = "EVA_ID"; dt.Columns.Add(EVA_ID); ViewState["datagrid"] = dt; BindGrid(); Clear(); DDLDIS.Enabled = true; try { ValidateUserAccess(); ATCommon.FillDrpDown(DDLDIS, DBManager.Get(new Hashtable(), "CMB_DIS_MASTER"), "Select Disorder Name", "DIS_NAME", "DIS_ID", "0"); ATCommon.FillDrpDown(DDLEVA, DBManager.Get(new Hashtable(), "CMB_EVALUATION"), "Select Evaluation Name", "EVA_NAME", "EVA_ID", "0"); if (vID != null) { Hashtable vHashtable = new Hashtable(); vHashtable.Add("EVADIS_DISID", vID); vHashtable.Add("TYPE", "GET"); DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_EVALUATION_DISORDER")); dt1 = DBManager.Get(vHashtable, "GET_EVALUATION_DISORDER"); if (vDR != null) { DDLDIS.SelectedItem.Text = vDR["DIS_NAME"].ToString(); DDLEVA.SelectedItem.Text = vDR["EVA_NAME"].ToString(); this.EVA_ID1.Columns[3].Visible = false; this.EVA_ID1.Columns[2].Visible = false; btnSave.Visible = false; btnAdd.Visible = false; } EVA_ID1.DataSource = dt1; EVA_ID1.DataBind(); } } catch (Exception xe) { ShowMsg(xe); } } }