public virtual CloudAccountDA.HomePageSliderDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.HomePageSliderDataTable dataTable = new CloudAccountDA.HomePageSliderDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
protected void btnUpdate_Click(object sender, EventArgs e) { try { if (this.Page.IsValid) { byte[] numArray1; byte[] numArray2; if (this.flUploadSlider1.HasFile && this.flUploadSlider2.HasFile) { int contentLength1 = this.flUploadSlider1.PostedFile.ContentLength; numArray1 = new byte[contentLength1]; this.flUploadSlider1.PostedFile.InputStream.Read(numArray1, 0, contentLength1); int contentLength2 = this.flUploadSlider2.PostedFile.ContentLength; numArray2 = new byte[contentLength2]; this.flUploadSlider2.PostedFile.InputStream.Read(numArray2, 0, contentLength2); } else if (this.flUploadSlider1.HasFile) { this.objHomePageSliderDT = this.objHomePageSliderBll.GetDataByHomePageSliderID(int.Parse(this.hfHome.Value.Trim())); numArray2 = (byte[])this.objHomePageSliderDT.Rows[0]["Slider2"]; int contentLength = this.flUploadSlider1.PostedFile.ContentLength; numArray1 = new byte[contentLength]; this.flUploadSlider1.PostedFile.InputStream.Read(numArray1, 0, contentLength); } else if (this.flUploadSlider2.HasFile) { this.objHomePageSliderDT = this.objHomePageSliderBll.GetDataByHomePageSliderID(int.Parse(this.hfHome.Value.Trim())); numArray1 = (byte[])this.objHomePageSliderDT.Rows[0]["Slider1"]; int contentLength = this.flUploadSlider2.PostedFile.ContentLength; numArray2 = new byte[contentLength]; this.flUploadSlider2.PostedFile.InputStream.Read(numArray2, 0, contentLength); } else { this.objHomePageSliderDT = this.objHomePageSliderBll.GetDataByHomePageSliderID(int.Parse(this.hfHome.Value.Trim())); numArray1 = (byte[])this.objHomePageSliderDT.Rows[0]["Slider1"]; numArray2 = (byte[])this.objHomePageSliderDT.Rows[0]["Slider2"]; } if (this.objHomePageSliderBll.UpdateHomePageSlider(int.Parse(this.hfHome.Value.Trim()), numArray1, this.edContent1.Content.Trim(), numArray2, this.edContent2.Content.Trim())) { this.DisplayAlert("Update Successfully.."); this.Response.Redirect("~/BillTransact/HomePageSlider.aspx?cmd=view&ID=" + this.Request.QueryString["ID"]); } else { this.DisplayAlert("Fail to Update Details."); } } else { this.DisplayAlert("Fail to Update Details."); } } catch (Exception ex) { this.DisplayAlert(ex.Message); } }
public virtual int Fill(CloudAccountDA.HomePageSliderDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void SetRecord(string iD) { this.objHomePageSliderDT = this.objHomePageSliderBll.GetDataByHomePageSliderID(int.Parse(iD)); if (this.objHomePageSliderDT.Rows.Count <= 0) { return; } this.hfHome.Value = this.objHomePageSliderDT.Rows[0]["HomePageSliderID"].ToString(); this.edContent1.Content = this.objHomePageSliderDT.Rows[0]["SliderContent1"].ToString(); this.edContent2.Content = this.objHomePageSliderDT.Rows[0]["SliderContent2"].ToString(); }
public Stream ShowProfileImage(int hId) { this._objHomePageSliderDt = this._objHomePageSliderBll.GetDataByHomePageSliderID(hId); try { return((Stream) new MemoryStream((byte[])this._objHomePageSliderDt.Rows[0]["Slider2"])); } catch { return((Stream)null); } }
private void ViewRecord(string i) { this.objHomePageSliderDT = this.objHomePageSliderBll.GetDataByHomePageSliderID(int.Parse(i)); if (this.objHomePageSliderDT.Rows.Count <= 0) { return; } this.hfHome.Value = this.objHomePageSliderDT.Rows[0]["HomePageSliderID"].ToString(); this.lblContent1.Text = this.objHomePageSliderDT.Rows[0]["SliderContent1"].ToString(); this.lblContent2.Text = this.objHomePageSliderDT.Rows[0]["SliderContent2"].ToString(); this.imgSlider1.ImageUrl = "~/Handler/HomeSliderHandler1.ashx?id=" + this.hfHome.Value; this.imgSlider2.ImageUrl = "~/Handler/HomeSliderHandler2.ashx?id=" + this.hfHome.Value; }
private void GotoPage() { this.objHomePageSliderDT = this.objHomePageSliderBll.GetAllDetail(); if (this.objHomePageSliderDT.Rows.Count > 0) { this.hfHome.Value = this.objHomePageSliderDT.Rows[0]["HomePageSliderID"].ToString(); this.Response.Redirect("~/BillTransact/HomePageSlider.aspx?cmd=view&ID=" + this.hfHome.Value); } else { this.Response.Redirect("~/BillTransact/HomePageSlider.aspx?cmd=add"); } }
public virtual CloudAccountDA.HomePageSliderDataTable GetDataByHomePageSliderID(int?HomePageSliderID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (HomePageSliderID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = HomePageSliderID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.HomePageSliderDataTable dataTable = new CloudAccountDA.HomePageSliderDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Update(CloudAccountDA.HomePageSliderDataTable dataTable) { return(this.Adapter.Update(dataTable)); }