public virtual CloudAccountDA.FAQCategoryMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.FAQCategoryMasterDataTable dataTable = new CloudAccountDA.FAQCategoryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.FAQCategoryMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void SetRecord(string iD) { this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.GetDataByFAQCategoryID(int.Parse(iD)); if (this.objFAQCategoryMasterDT.Rows.Count <= 0) { return; } this.hfFAQCategory.Value = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryID"].ToString(); this.txtFAQCategoryName.Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryName"].ToString(); this.txtDesc.Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryDesc"].ToString(); this.chkStatus.Checked = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryStatus"].ToString() == "True"; }
private void ViewRecord(string i) { this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.GetDataByFAQCategoryID(int.Parse(i)); if (this.objFAQCategoryMasterDT.Rows.Count <= 0) { return; } this.hfFAQCategory.Value = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryID"].ToString(); this.lblFAQCategoryName.Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryName"].ToString(); this.lblDesc.Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryDesc"].ToString(); this.lblStatus.Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryStatus"].ToString() == "True" ? "True" : "False"; }
protected void gvFAQ_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType != DataControlRowType.DataRow) { return; } this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.GetDataByFAQCategoryID(int.Parse(e.Row.Cells[1].Text)); if (this.objFAQCategoryMasterDT.Rows.Count == 0) { return; } e.Row.Cells[1].Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryName"].ToString(); }
public virtual CloudAccountDA.FAQCategoryMasterDataTable GetDataByFAQCategoryID(int?FAQCategoryID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (FAQCategoryID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = FAQCategoryID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.FAQCategoryMasterDataTable dataTable = new CloudAccountDA.FAQCategoryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.FAQCategoryMasterDataTable GetDataByFAQCategoryName(string FAQCategoryName) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (FAQCategoryName == null) { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = FAQCategoryName; } CloudAccountDA.FAQCategoryMasterDataTable dataTable = new CloudAccountDA.FAQCategoryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void ViewRecord(string i) { this.objFAQMasterDT = this.objFAQMasterBll.GetDataByFAQID(int.Parse(i)); if (this.objFAQMasterDT.Rows.Count <= 0) { return; } this.hfFAQ.Value = this.objFAQMasterDT.Rows[0]["FAQID"].ToString(); this.lblFAQQuestion.Text = this.objFAQMasterDT.Rows[0]["Question"].ToString(); this.lblFAQAnswer.Text = this.objFAQMasterDT.Rows[0]["Answer"].ToString(); this.lblStatus.Text = this.objFAQMasterDT.Rows[0]["Status"].ToString() == "True" ? "True" : "False"; this.lblFAQCategory.Text = this.objFAQMasterDT.Rows[0]["FAQCategoryID"].ToString(); this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.GetDataByFAQCategoryID(int.Parse(this.lblFAQCategory.Text)); this.lblFAQCategory.Text = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryName"].ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (this.Master == null) { return; } ((HtmlControl)this.Master.FindControl("FAQs")).Attributes.Add("class", "current-menu-item current-menu-ancestor"); this.hfFAQ.Value = "1"; if (this.IsPostBack) { return; } try { if (this.Request.QueryString.Count > 0 && !string.IsNullOrEmpty(this.Request.QueryString["fId"])) { this.Session["FAQCategoryID"] = (object)this.Request.QueryString["fId"]; } if (this.Session["FAQCategoryID"] != null) { this.sqldsFAQMaster.SelectParameters["FAQCategoryID"].DefaultValue = this.hfFAQ.Value = this.Session["FAQCategoryID"].ToString(); this.sqldsFAQMaster.DataBind(); this.Session.Abandon(); } else { this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.MaxFAQCategoryID(); if (this.objFAQCategoryMasterDT.Rows.Count > 0) { this.hfFAQ.Value = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryID"].ToString(); } this.sqldsFAQMaster.SelectParameters["FAQCategoryID"].DefaultValue = this.hfFAQ.Value; this.sqldsFAQMaster.DataBind(); } this.pnlView.Visible = true; this.pnlViewAll.Visible = false; } catch (Exception ex) { this.pnlView.Visible = false; this.pnlViewAll.Visible = true; } }
private void SetRecord(string iD) { this.objFAQMasterDT = this.objFAQMasterBll.GetDataByFAQID(int.Parse(iD)); if (this.objFAQMasterDT.Rows.Count <= 0) { return; } this.hfFAQ.Value = this.objFAQMasterDT.Rows[0]["FAQID"].ToString(); this.txtFAQQuestion.Text = this.objFAQMasterDT.Rows[0]["Question"].ToString(); this.txtFAQAnswer.Text = this.objFAQMasterDT.Rows[0]["Answer"].ToString(); this.chkStatus.Checked = this.objFAQMasterDT.Rows[0]["Status"].ToString() == "True"; this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.GetDataByFAQCategoryID(int.Parse(this.objFAQMasterDT.Rows[0]["FAQCategoryID"].ToString())); if (this.objFAQCategoryMasterDT.Rows.Count <= 0) { return; } this.ddlFAQCategory.Items.Add(this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryID"].ToString()); this.ddlFAQCategory.SelectedValue = this.objFAQCategoryMasterDT.Rows[0]["FAQCategoryID"].ToString(); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (this.txtFAQCategoryName.Text.Trim().Length > 0) { this.objFAQCategoryMasterDT = this.objFAQCategoryMasterBll.GetDataByFAQCategoryName(this.txtFAQCategoryName.Text); if (this.objFAQCategoryMasterDT.Rows.Count > 0) { this.DisplayAlert("FAQ Category Already Exist.."); FAQCategoryMaster.checkInDB = true; } else { FAQCategoryMaster.checkInDB = false; } if (!FAQCategoryMaster.checkInDB) { int num = this.objFAQCategoryMasterBll.AddFAQCategory(this.txtFAQCategoryName.Text.Trim(), this.txtDesc.Text.Trim(), this.chkStatus.Checked); if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/FAQCategoryMaster.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...!"); } }
public virtual int Update(CloudAccountDA.FAQCategoryMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }