private void GetClientPersonal() { try { DataSet ds = _ObjClientProfileBL.GetClientPersonal(ObjEn.Decrypt(Request.QueryString["x"].ToString())); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { documentsection.Visible = true; txtSaId.Text = ds.Tables[0].Rows[0]["SAID"].ToString(); txtName.Text = ds.Tables[0].Rows[0]["FirstName"].ToString() + " " + ds.Tables[0].Rows[0]["LastName"].ToString(); } else { documentsection.Visible = false; messagedoc.Text = "Please enter Personal Details in order to upload Documents"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "CloseDocumentModal();", true); } } catch { lblTitle.Text = "Warning!"; lblTitle.ForeColor = System.Drawing.Color.Red; message.ForeColor = System.Drawing.Color.Red; message.Text = "Sorry, Something went wrong, please contact administrator"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true); } }
private void GetClientPersonal() { try { DataSet ds = _ObjClientProfileBL.GetClientPersonal(Session["SAID"].ToString()); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { txtSAId.ReadOnly = true; ddlTitle.Enabled = false; txtFirstName.ReadOnly = true; txtLastName.ReadOnly = true; txtEmail.ReadOnly = true; txtPhoneNo.ReadOnly = true; txtMobileNo.ReadOnly = true; txtDateofBirth.ReadOnly = true; //txtDateofBirth.Attributes.Add("disabled", "disabled"); txtTaxRefNo.ReadOnly = true; fuImageUpload.Enabled = false; ViewState["flag"] = 1; txtSAId.Text = ds.Tables[0].Rows[0]["SAID"].ToString(); ddlTitle.SelectedValue = ds.Tables[0].Rows[0]["Title"].ToString(); txtFirstName.Text = ds.Tables[0].Rows[0]["FirstName"].ToString(); txtLastName.Text = ds.Tables[0].Rows[0]["LastName"].ToString(); txtEmail.Text = ds.Tables[0].Rows[0]["EmailID"].ToString(); txtMobileNo.Text = ds.Tables[0].Rows[0]["Mobile"].ToString(); txtPhoneNo.Text = ds.Tables[0].Rows[0]["Phone"].ToString(); if (ds.Tables[0].Rows[0]["DateOfBirth"].ToString() != "") { txtDateofBirth.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["DateOfBirth"].ToString()).Date.ToString("yyyy-MM-dd"); } else { txtDateofBirth.Text = ""; } txtTaxRefNo.Text = ds.Tables[0].Rows[0]["TaxRefNo"].ToString(); btnSubmitClientPersonal.Text = "Edit"; DivAddBank.Visible = true; } else { txtSAId.ReadOnly = true; ddlTitle.Enabled = false; txtFirstName.ReadOnly = true; txtLastName.ReadOnly = false; txtEmail.ReadOnly = true; txtPhoneNo.ReadOnly = false; txtMobileNo.ReadOnly = false; txtDateofBirth.ReadOnly = false; //txtDateofBirth.Attributes.Add("disabled", "disabled"); txtTaxRefNo.ReadOnly = false; ViewState["flag"] = 2; btnSubmitClientPersonal.Text = "Submit"; GetClientRegistartion(); DivAddBank.Visible = false; } } catch { lblTitle.Text = "Warning!"; lblTitle.ForeColor = System.Drawing.Color.Red; message.ForeColor = System.Drawing.Color.Red; message.Text = "Sorry, Something went wrong, please contact administrator"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true); } }