public virtual CloudAccountDA.AboutContentMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.AboutContentMasterDataTable dataTable = new CloudAccountDA.AboutContentMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.AboutContentMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
public Stream ShowProfileImage(int conId) { this._objAboutContentMasterDt = this._objAboutContentMasterBll.GetDataByAboutContentID(conId); try { return((Stream) new MemoryStream((byte[])this._objAboutContentMasterDt.Rows[0]["AboutContentImage"])); } catch { return((Stream)null); } }
protected void btnUpdate_Click(object sender, EventArgs e) { try { if (this.Page.IsValid) { if (this.ddlAboutCategory.SelectedIndex > 0) { bool flag; if (this.fuAboutContentImage.HasFile) { int contentLength = this.fuAboutContentImage.PostedFile.ContentLength; byte[] numArray = new byte[contentLength]; this.fuAboutContentImage.PostedFile.InputStream.Read(numArray, 0, contentLength); flag = this.objAboutContentMasterBll.UpdateAboutContent(int.Parse(this.hfAboutContent.Value.Trim()), int.Parse(this.ddlAboutCategory.SelectedItem.Value), this.edContent.Content, numArray, this.chkStatus.Checked); } else { this.objAboutContentMasterDT = this.objAboutContentMasterBll.GetDataByAboutContentID(int.Parse(this.hfAboutContent.Value.Trim())); byte[] byAboutContentImage = (byte[])null; if (!string.IsNullOrEmpty(this.objAboutContentMasterDT.Rows[0]["AboutContentImage"].ToString())) { byAboutContentImage = (byte[])this.objAboutContentMasterDT.Rows[0]["AboutContentImage"]; } flag = this.objAboutContentMasterBll.UpdateAboutContent(int.Parse(this.hfAboutContent.Value.Trim()), int.Parse(this.ddlAboutCategory.SelectedItem.Value), this.edContent.Content, byAboutContentImage, this.chkStatus.Checked); } if (flag) { this.DisplayAlert("Update Successfully.."); this.Response.Redirect("~/BillTransact/AboutContentMaster.aspx?cmd=view&ID=" + this.Request.QueryString["ID"]); } else { this.DisplayAlert("Fail to Update Details."); } } else { this.DisplayAlert("Please Fill All Details...!"); } } else { this.DisplayAlert("Fail to Update Details."); } } catch (Exception ex) { this.DisplayAlert(ex.Message); } }
public virtual CloudAccountDA.AboutContentMasterDataTable 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.AboutContentMasterDataTable dataTable = new CloudAccountDA.AboutContentMasterDataTable(); 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"; }
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.AboutContentMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }