private void SetRecord(string iD) { this.objSecurityQuestionMasterDT = this.objSecurityQuestionMasterBll.GetDataBySecurityQuestionID(int.Parse(iD)); if (this.objSecurityQuestionMasterDT.Rows.Count <= 0) { return; } this.hfSecurityQuestion.Value = this.objSecurityQuestionMasterDT.Rows[0]["SecurityQuestionID"].ToString(); this.txtQuestion.Text = this.objSecurityQuestionMasterDT.Rows[0]["Question"].ToString(); this.txtAnswer.Text = this.objSecurityQuestionMasterDT.Rows[0]["DefaultAnswer"].ToString(); this.txtDesc.Text = this.objSecurityQuestionMasterDT.Rows[0]["Description"].ToString(); this.chkStatus.Checked = this.objSecurityQuestionMasterDT.Rows[0]["Status"].ToString() == "True"; this.objPasswordQuestionDT = this.objPasswordQuestionBll.GetAllPasswordQuestion(this.txtQuestion.Text); if (this.objPasswordQuestionDT.Rows.Count > 0) { this.lblError.Text = "Security Question Is Assign To Some User..! So Can't Update This Question..!"; this.txtQuestion.Enabled = false; this.chkStatus.Enabled = false; } else { this.txtQuestion.Enabled = true; this.chkStatus.Enabled = true; } }
public virtual CloudAccountDA.aspnet_MembershipDataTable GetData(string PasswordQuestion) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (PasswordQuestion == null) { this.Adapter.SelectCommand.Parameters[0].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[0].Value = PasswordQuestion; } CloudAccountDA.aspnet_MembershipDataTable dataTable = new CloudAccountDA.aspnet_MembershipDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.aspnet_MembershipDataTable dataTable, string PasswordQuestion) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (PasswordQuestion == null) { this.Adapter.SelectCommand.Parameters[0].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[0].Value = PasswordQuestion; } if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
protected void btnDelete_Click(object sender, EventArgs e) { if (this.hfSecurityQuestion.Value != null) { this.objPasswordQuestionDT = this.objPasswordQuestionBll.GetAllPasswordQuestion(this.lblQuestion.Text); if (this.objPasswordQuestionDT.Rows.Count > 0) { this.DisplayAlert("Security Question Is Assign To Some User..! So Can't Delete This Question..!"); } else if (this.objSecurityQuestionMasterBll.DeleteSecurityQuestion(int.Parse(this.hfSecurityQuestion.Value))) { this.DisplayAlert("Details has been Deleted"); this.Response.Redirect("~/BillTransact/SecurityQuestionMaster.aspx"); } else { this.DisplayAlert("Error In Deleting Detail"); } } else { this.DisplayAlert("Error In Deleting Detail"); } }