public virtual CloudAccountDA.AboutCategoryMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.AboutCategoryMasterDataTable dataTable = new CloudAccountDA.AboutCategoryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.AboutCategoryMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void SetRecord(string iD) { this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.GetDataByAboutCategoryID(int.Parse(iD)); if (this.objAboutCategoryMasterDT.Rows.Count <= 0) { return; } this.hfAboutCategory.Value = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryID"].ToString(); this.txtAboutCategoryName.Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryName"].ToString(); this.txtDesc.Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryDesc"].ToString(); this.chkStatus.Checked = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryStatus"].ToString() == "True"; }
private void ViewRecord(string i) { this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.GetDataByAboutCategoryID(int.Parse(i)); if (this.objAboutCategoryMasterDT.Rows.Count <= 0) { return; } this.hfAboutCategory.Value = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryID"].ToString(); this.lblAboutCategoryName.Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryName"].ToString(); this.lblDesc.Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryDesc"].ToString(); this.lblStatus.Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryStatus"].ToString() == "True" ? "True" : "False"; }
protected void gvAboutCategory_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType != DataControlRowType.DataRow) { return; } this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.GetDataByAboutCategoryID(int.Parse(e.Row.Cells[1].Text)); if (this.objAboutCategoryMasterDT.Rows.Count == 0) { return; } e.Row.Cells[1].Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryName"].ToString(); }
public virtual CloudAccountDA.AboutCategoryMasterDataTable GetDataByAboutCategoryID(int?AboutCategoryID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (AboutCategoryID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = AboutCategoryID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.AboutCategoryMasterDataTable dataTable = new CloudAccountDA.AboutCategoryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void SetRecord(string iD) { this.objAboutContentMasterDT = this.objAboutContentMasterBll.GetDataByAboutContentID(int.Parse(iD)); if (this.objAboutContentMasterDT.Rows.Count <= 0) { return; } this.hfAboutContent.Value = this.objAboutContentMasterDT.Rows[0]["AboutContentID"].ToString(); this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.GetDataByAboutCategoryID(int.Parse(this.objAboutContentMasterDT.Rows[0]["AboutCategoryID"].ToString())); if (this.objAboutCategoryMasterDT.Rows.Count > 0) { this.ddlAboutCategory.Items.Add(this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryID"].ToString()); this.ddlAboutCategory.SelectedValue = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryID"].ToString(); } this.edContent.Content = this.objAboutContentMasterDT.Rows[0]["AboutContent"].ToString(); this.chkStatus.Checked = this.objAboutContentMasterDT.Rows[0]["AboutContentStatus"].ToString() == "True"; }
protected void btnSubmit_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (this.txtAboutCategoryName.Text.Trim().Length > 0) { this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.GetDataByAboutCategoryName(this.txtAboutCategoryName.Text); if (this.objAboutCategoryMasterDT.Rows.Count > 0) { this.DisplayAlert("About Category Already Exist.."); AboutCategoryMaster.checkInDB = true; } else { AboutCategoryMaster.checkInDB = false; } if (!AboutCategoryMaster.checkInDB) { int num = this.objAboutCategoryMasterBll.AddAboutCategory(this.txtAboutCategoryName.Text.Trim(), this.txtDesc.Text.Trim(), this.chkStatus.Checked); if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/AboutCategoryMaster.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 Page_Load(object sender, EventArgs e) { //if (this.Master == null) // return; //((HtmlControl) this.Master.FindControl("aboutus")).Attributes.Add("class", "current-menu-item current-menu-ancestor"); this.hfAbout.Value = "1"; if (this.IsPostBack) { return; } try { if (this.Request.QueryString.Count > 0 && !string.IsNullOrEmpty(this.Request.QueryString["aId"])) { this.Session["AboutCategoryID"] = (object)this.Request.QueryString["aId"]; } if (this.Session["AboutCategoryID"] != null) { this.sqldsAboutMaster.SelectParameters["AboutCategoryID"].DefaultValue = this.hfAbout.Value = this.Session["AboutCategoryID"].ToString(); this.sqldsAboutMaster.DataBind(); this.Session.Abandon(); } else { this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.MaxAboutCategoryID(); if (this.objAboutCategoryMasterDT.Rows.Count > 0) { this.hfAbout.Value = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryID"].ToString(); } this.sqldsAboutMaster.SelectParameters["AboutCategoryID"].DefaultValue = this.hfAbout.Value; this.sqldsAboutMaster.DataBind(); } //this.pnlView.Visible = true; //this.pnlViewAll.Visible = false; } catch (Exception ex) { //this.pnlView.Visible = false; //this.pnlViewAll.Visible = true; } }
private void ViewRecord(string i) { this.objAboutContentMasterDT = this.objAboutContentMasterBll.GetDataByAboutContentID(int.Parse(i)); if (this.objAboutContentMasterDT.Rows.Count <= 0) { return; } this.hfAboutContent.Value = this.objAboutContentMasterDT.Rows[0]["AboutContentID"].ToString(); this.lblContent.Text = this.objAboutContentMasterDT.Rows[0]["AboutContent"].ToString(); this.lblStatus.Text = this.objAboutContentMasterDT.Rows[0]["AboutContentStatus"].ToString() == "True" ? "True" : "False"; if (!string.IsNullOrEmpty(this.objAboutContentMasterDT.Rows[0]["AboutContentImage"].ToString())) { this.imgAboutContentImage.ImageUrl = "~/Handler/AboutContentHandler.ashx?id=" + this.hfAboutContent.Value; } else { this.imgAboutContentImage.ImageUrl = (string)null; this.imgAboutContentImage.Visible = false; } this.lblAboutCategory.Text = this.objAboutContentMasterDT.Rows[0]["AboutCategoryID"].ToString(); this.objAboutCategoryMasterDT = this.objAboutCategoryMasterBll.GetDataByAboutCategoryID(int.Parse(this.lblAboutCategory.Text)); this.lblAboutCategory.Text = this.objAboutCategoryMasterDT.Rows[0]["AboutCategoryName"].ToString(); }
public virtual int Update(CloudAccountDA.AboutCategoryMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }