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) { try { ATCommon.FillDrpDown(DDLAGE, DBManager.Get(new Hashtable(), "CMB_AGE_SCREEN_MASTER"), "Select Group Name", "AGRP_GROUP", "AGRP_ID", "0"); ATCommon.FillCDWR(EVALUATION_DDL, DBManager.Get(new Hashtable(), "CMB_EVALUATION"), "Select Evaluation Name", "EVA_NAME", "EVA_ID", ""); if (vID != null) { Hashtable vHashtable = new Hashtable(); vHashtable.Add("RPT_ID", vID); vHashtable.Add("TYPE", "GET"); DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_MASTER_REPORT_ID")); if (vDR != null) { TXTID.Value = vDR["RPT_ID"].ToString(); REPORT_TXT.Text = vDR["RPT_NAME"].ToString(); DDLAGE.Text = vDR["AGRP_ID"].ToString(); REPORT_TXT.Enabled = false; DDLAGE.Enabled = false; SAVEBTN.Visible = false; Textarea1.InnerText = vDR["RPTD_REPREASON"].ToString(); Textarea2.InnerText = vDR["RPTD_MED"].ToString(); Textarea3.InnerText = vDR["RPTD_PTMID"].ToString(); Textarea4.InnerText = vDR["RPTD_PTFHID"].ToString(); Textarea5.InnerText = vDR["RPTD_DOBSID"].ToString(); Textarea11.InnerText = vDR["RPTD_DST"].ToString(); Textarea17.InnerText = vDR["RPTD_RECOM"].ToString(); Get_Evaluation_Name(EVALUATION_DDL, vDR["RPTD_EVAID"].ToString(), true); } else { ShowMsg("Invalid Patient ID"); } } EVALUATION_DDL.Enabled = true; } catch (Exception xe) { ShowMsg(xe); } } }
protected void Page_Load(object sender, EventArgs e) { vATSession = (ATSession)Session["User"]; String vID = Request.QueryString["ID"]; if (vATSession == null) { Response.Redirect("Default.aspx"); } if (!IsPostBack) { dt = new DataTable(); DataColumn coltypid = new DataColumn(); coltypid.DataType = Type.GetType("System.String"); coltypid.ColumnName = "CUSTP_TYPE_ID"; dt.Columns.Add(coltypid); DataColumn coltypname = new DataColumn(); coltypname.DataType = Type.GetType("System.String"); coltypname.ColumnName = "CUST_TYP_NAME"; dt.Columns.Add(coltypname); DataColumn colvalue = new DataColumn(); colvalue.DataType = Type.GetType("System.String"); colvalue.ColumnName = "CUSTP_VALUE"; dt.Columns.Add(colvalue); DataColumn coldesc = new DataColumn(); coldesc.DataType = Type.GetType("System.String"); coldesc.ColumnName = "CUSTP_DESC"; dt.Columns.Add(coldesc); ViewState["datagrid"] = dt; BindGrid(); Clear(); try { ValidateUserAccess(); ATCommon.FillDrpDown(CUST_COUNTRY_DDL, DBManager.Get(new Hashtable(), "CMB_COUNTRY_MASTER"), "Select Country Name", "COUNTRY_NAME", "COUNTRY_ID", "0"); ATCommon.FillCDWR(CUST_TYPE_DDL, DBManager.Get(new Hashtable(), "CMB_CUST_TYPE"), "", "CUST_TYP_NAME", "CUST_TYP_ID", "0"); ATCommon.FillDrpDown(ORGANIZATION_DDL, DBManager.Get(new Hashtable(), "CMB_ORGANIZATION"), "Select Organization Name", "USR_ORGANIZATION_NAME", "USR_LOGIN", "0"); Hashtable vHashta = new Hashtable(); vHashta.Add("STATE_ID", ddl_state.SelectedValue); ATCommon.FillDrpDown(ddl_state, DBManager.Get(vHashta, "CMB_State"), "Select State Name", "STATE_NAME", "STATE_ID", ""); if (vATSession.UserType == "ADMIN") { ATCommon.FillCDWR(CUST_TYPE_DDL, DBManager.Get(new Hashtable(), "CMB_CUST_TYPE"), "Select Customer type", "CUST_TYP_NAME", "CUST_TYP_ID", "0"); ATCommon.FillDrpDown(CUST_CATRGORY_DDL, DBManager.Get(new Hashtable(), "[GET_CATEGORY]"), "Select Category ", "CAT_NAME", "CAT_ID", "0"); } else { ATCommon.FillDrpDown(CUST_TYPE_DDL, DBManager.Get(new Hashtable(), "CMB_CUST_TYPE_VSO"), "", "CUST_TYP_NAME", "CUST_TYP_ID", "0"); ATCommon.FillDrpDown(CUST_CATRGORY_DDL, DBManager.Get(new Hashtable(), "[GET_CATEGORY_BY_VSR]"), "Select Category ", "CAT_NAME", "CAT_ID", "0"); } if (vID != null) { Hashtable vHashtable4 = new Hashtable(); vHashtable4.Add("CUSTPID", vID); dt = DBManager.Get(vHashtable4, "GET_CUSTPROFILE"); ViewState["datagrid"] = dt; BindGrid(); Hashtable vHashtable = new Hashtable(); vHashtable.Add("ID", vID); DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_CUSTOMER_ID")); if (vDR != null) { if (vATSession.UserType == "ADMIN") { CUST_NAME_TXT.Text = vDR["CUST_NAME"].ToString(); CUST_PREFIX_NAME.Text = vDR["CUST_PREFIX"].ToString(); CUST_COUNTRY_DDL.SelectedValue = vDR["CUST_COUNTRY_ID"].ToString(); string Prospective = vDR["CUST_PROSPECTIVE"].ToString().Trim(); if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "Yes") { ddlProspective.SelectedIndex = 2; } else if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "No") { ddlProspective.SelectedIndex = 1; } TXTID.Value = vDR["CUST_ID"].ToString(); CUST_ADD_TXT.Text = vDR["CUST_ROAD_STREET_HOUSE"].ToString(); CUST_COMP_NAME_TXT.Text = vDR["CUST_COMP_NAME"].ToString(); CUST_PIN_TXT.Text = vDR["CUST_PIN"].ToString(); CUST_PH_TXT.Text = vDR["CUST_PHONE"].ToString(); TXT_DESIGNATION.Text = vDR["CUST_DESIGNATION"].ToString(); CUST_EMAIL_TXT.Text = vDR["CUST_EMAIL"].ToString(); CUST_MOBILE_TXT.Text = vDR["CUST_MOBILE"].ToString(); txt_vil.Text = vDR["CUST_VILLAGE_TWN_CITY"].ToString(); CUST_CONSL_TXT.Text = vDR["CUST_CONSULT_NAME"].ToString(); CUST_CONSL_MOB_TXT.Text = vDR["CUST_CONSULT_MOB"].ToString(); txt_post.Text = vDR["CUST_POST_OFFICE"].ToString(); ddl_state.SelectedIndex = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_STA_ID"].ToString())); ddlProspective.SelectedItem.Text = vDR["CUST_PROSPECTIVE"].ToString(); CUST_CATRGORY_DDL.SelectedIndex = CUST_CATRGORY_DDL.Items.IndexOf(CUST_CATRGORY_DDL.Items.FindByValue(vDR["CUST_CATRGORY_ID"].ToString())); CUST_STATION_DDL.SelectedItem.Text = vDR["CITY_NAME"].ToString();//09112010 changed CUST_COUNTRY_DDL.SelectedIndex = CUST_COUNTRY_DDL.Items.IndexOf(CUST_COUNTRY_DDL.Items.FindByValue(vDR["CUST_COUNTRY_ID"].ToString())); CUST_COUNTRY_DDL_SelectedIndexChanged(sender, e); ORGANIZATION_DDL.SelectedItem.Text = vDR["CUST_ORGANIZATION_NAME"].ToString(); HiddenField1.Value = vDR["CUST_ARHQ_ID"].ToString(); TXT_START.Text = vDR["CUST_FROM_DATE"].ToString(); TXT_END.Text = vDR["CUST_TO_DATE"].ToString(); } else { string Prospective = vDR["CUST_PROSPECTIVE"].ToString().Trim(); if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "Yes") { ddlProspective.SelectedIndex = 2; } else if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "No") { ddlProspective.SelectedIndex = 1; } TXTID.Value = vDR["CUST_ID"].ToString(); CUST_NAME_TXT.Text = vDR["CUST_NAME"].ToString(); CUST_PREFIX_NAME.Text = vDR["CUST_PREFIX"].ToString(); if (CUST_NAME_TXT.Text == "STORE" || CUST_NAME_TXT.Text == "MEDSTORE") { CUST_NAME_TXT.Enabled = true; } else { CUST_NAME_TXT.Enabled = true; } CUST_COMP_NAME_TXT.Enabled = false; CUST_ADD_TXT.Text = vDR["CUST_ROAD_STREET_HOUSE"].ToString(); CUST_COMP_NAME_TXT.Text = vDR["CUST_COMP_NAME"].ToString(); CUST_COMP_NAME_TXT.Enabled = false; CUST_PIN_TXT.Text = vDR["CUST_PIN"].ToString(); CUST_PH_TXT.Text = vDR["CUST_PHONE"].ToString(); CUST_EMAIL_TXT.Text = vDR["CUST_EMAIL"].ToString(); TXT_DESIGNATION.Text = vDR["CUST_DESIGNATION"].ToString(); CUST_MOBILE_TXT.Text = vDR["CUST_MOBILE"].ToString(); txt_vil.Text = vDR["CUST_VILLAGE_TWN_CITY"].ToString(); CUST_CONSL_TXT.Text = vDR["CUST_CONSULT_NAME"].ToString(); CUST_CONSL_MOB_TXT.Text = vDR["CUST_CONSULT_MOB"].ToString(); txt_post.Text = vDR["CUST_POST_OFFICE"].ToString(); ddlProspective.SelectedIndex = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_PROSPECTIVE"].ToString())); ddl_state.SelectedIndex = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_STA_ID"].ToString())); CUST_CATRGORY_DDL.SelectedIndex = CUST_CATRGORY_DDL.Items.IndexOf(CUST_CATRGORY_DDL.Items.FindByValue(vDR["CUST_CATRGORY_ID"].ToString())); CUST_CATRGORY_DDL.Enabled = false; CUST_COUNTRY_DDL.SelectedIndex = CUST_COUNTRY_DDL.Items.IndexOf(CUST_COUNTRY_DDL.Items.FindByValue(vDR["CUST_COUNTRY_ID"].ToString())); CUST_COUNTRY_DDL_SelectedIndexChanged(sender, e); ddl_state.SelectedIndex = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_STA_ID"].ToString())); ddlProspective.SelectedItem.Text = vDR["CUST_PROSPECTIVE"].ToString(); ORGANIZATION_DDL.SelectedItem.Text = vDR["CUST_ORGANIZATION_NAME"].ToString(); CUST_STATION_DDL.SelectedItem.Text = vDR["CITY_NAME"].ToString(); HiddenField1.Value = vDR["CUST_ARHQ_ID"].ToString(); TXT_START.Text = vDR["CUST_FROM_DATE"].ToString(); TXT_END.Text = vDR["CUST_TO_DATE"].ToString(); } } } else { } } catch (Exception xe) { ShowMsg(xe); } } }