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.SecurityQuestionMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.SecurityQuestionMasterDataTable dataTable = new CloudAccountDA.SecurityQuestionMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.SecurityQuestionMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void ViewRecord(string i) { this.objSecurityQuestionMasterDT = this.objSecurityQuestionMasterBll.GetDataBySecurityQuestionID(int.Parse(i)); if (this.objSecurityQuestionMasterDT.Rows.Count <= 0) { return; } this.hfSecurityQuestion.Value = this.objSecurityQuestionMasterDT.Rows[0]["SecurityQuestionID"].ToString(); this.lblQuestion.Text = this.objSecurityQuestionMasterDT.Rows[0]["Question"].ToString(); this.lblAnswer.Text = this.objSecurityQuestionMasterDT.Rows[0]["DefaultAnswer"].ToString(); this.lblDesc.Text = this.objSecurityQuestionMasterDT.Rows[0]["Description"].ToString(); this.lblStatus.Text = this.objSecurityQuestionMasterDT.Rows[0]["Status"].ToString() == "True" ? "True" : "False"; }
public virtual CloudAccountDA.SecurityQuestionMasterDataTable GetDataByQuestion(string Question) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (Question == null) { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = Question; } CloudAccountDA.SecurityQuestionMasterDataTable dataTable = new CloudAccountDA.SecurityQuestionMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.SecurityQuestionMasterDataTable GetDataBySecurityQuestionID(int?SecurityQuestionID) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (SecurityQuestionID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = SecurityQuestionID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.SecurityQuestionMasterDataTable dataTable = new CloudAccountDA.SecurityQuestionMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (this.txtQuestion.Text.Trim().Length > 0) { this.objSecurityQuestionMasterDT = this.objSecurityQuestionMasterBll.GetDataByQuestion(this.txtQuestion.Text.Trim()); if (this.objSecurityQuestionMasterDT.Rows.Count > 0) { this.DisplayAlert("Security Question Already Exist.."); this.checkInDB = true; } else { this.checkInDB = false; } if (!this.checkInDB) { int num = this.objSecurityQuestionMasterBll.AddSecurityQuestion(this.txtQuestion.Text.Trim(), "", this.txtDesc.Text.Trim(), this.chkStatus.Checked); if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/SecurityQuestionMaster.aspx?cmd=view&ID=" + (object)num); } else { this.DisplayAlert("Fail to Add New Details."); this.Clear(); } } else { this.DisplayAlert("Fail to Add New Details."); this.Clear(); } } else { this.DisplayAlert("Please Fill All Details...!"); } }
protected void ddlQuestion_OnSelectedIndexChanged(object sender, EventArgs e) { if (this.ddlQuestion.SelectedIndex > 0) { this.objSecurityQuestionMasterDT = this.objSecurityQuestionMasterBll.GetDataBySecurityQuestionID(int.Parse(this.ddlQuestion.SelectedItem.Value)); if (this.objSecurityQuestionMasterDT.Rows.Count > 0) { this.txtAnswer.Text = this.objSecurityQuestionMasterDT.Rows[0]["DefaultAnswer"].ToString(); this.txtAnswer.Focus(); } else { this.ddlQuestion.SelectedIndex = 0; this.txtAnswer.Text = ""; this.ddlQuestion.Focus(); } } else { this.txtAnswer.Text = ""; this.ddlQuestion.Focus(); } }
public virtual int Update(CloudAccountDA.SecurityQuestionMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }