protected void DownloadFile(object sender, EventArgs e) { try { objcommon = new clsCommonHelper(); GridViewRow lnk = ((LinkButton)sender).NamingContainer as GridViewRow; LinkButton lbl = (LinkButton)lnk.FindControl("lnkDownload"); string abc = lbl.CommandArgument.ToString(); DT = objcommon.FillDataTable("GetSongPath", abc); if (DT.Rows.Count > 0) { string filepath = DT.Rows[0]["SongName"] + ""; Response.Clear(); Response.AppendHeader("Content-Disposition", "attachment; filename=" + filepath); string abc1 = Server.MapPath("/Data/" + filepath.ToString()); Response.TransmitFile(abc1); Response.Flush(); Response.End(); } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Exception", "alert('" + ex.Message + "');", true); } }
protected void DownloadFile(object sender, EventArgs e) { try { objcommon = new clsCommonHelper(); GridViewRow lnk = ((LinkButton)sender).NamingContainer as GridViewRow; LinkButton lbl = (LinkButton)lnk.FindControl("lnkDownload"); string SongId = lbl.CommandArgument.ToString(); DT = objcommon.FillDataTable("Get_Song_Path", SongId); if (DT.Rows.Count > 0) { string filepath = DT.Rows[0]["SongPath"] + ""; Response.Clear(); Response.AppendHeader("Content-Disposition", "attachment; filename=" + filepath); string abc1 = Server.MapPath("/Data/" + filepath.ToString()); Response.TransmitFile(abc1); Response.Flush(); Response.End(); } } catch (Exception ex) { Label1.Text = ex.Message.ToString(); Label1.ForeColor = Color.Red; } }
protected void bindTypeDdl() { try { objcommon = new clsCommonHelper(); DT = new DataTable(); DT = objcommon.FillDataTable("Get_Type", CommandType.StoredProcedure); if (DT.Rows.Count > 0) { objcommon.FillDDL(ddlcategory, DT); objcommon.FillDDL(ddlsingertype, DT); } else { ddlcategory.Items.Insert(0, new ListItem("", "")); ddlcategory.Items.Clear(); ddlcategory.Items.Insert(0, new ListItem("Select", "")); ddlsingertype.Items.Insert(0, new ListItem("", "")); ddlsingertype.Items.Clear(); ddlsingertype.Items.Insert(0, new ListItem("Select", "")); } } catch (Exception ex) { lblmsg.Text = ex.Message.ToString(); lblmsg.ForeColor = Color.Red; } }
public void bindLatestHits() { clsCommonHelper objcommon; objcommon = new clsCommonHelper(); Assert.IsNotNull(objcommon); }
public void bindTopDownloads() { clsCommonHelper objcommon; objcommon = new clsCommonHelper(); Assert.IsNotNull(objcommon); }
protected void BindGridView() { objcommon = new clsCommonHelper(); DT = new DataTable(); DT = objcommon.FillDataTable("get_BlogPost", CommandType.StoredProcedure); if (DT.Rows.Count > 0) { // GridView1.DataSource = DT; //GridView1.DataBind(); } }
protected void Bindddl() { objcommon1 = new clsCommonHelper(); DT = new DataTable(); DT = objcommon1.FillDataTable("get_projecttitle", CommandType.StoredProcedure); if (DT.Rows.Count > 0) { objcommon1.FillDDL(ddlproject, DT); } else { ddlproject.Items.Insert(0, new ListItem("", "")); ddlproject.Items.Clear(); ddlproject.Items.Insert(0, new ListItem("Select", "")); } }
protected void BindProjectUserGridview() { try { objcommon1 = new clsCommonHelper(); DT = new DataTable(); DT = objcommon1.FillDataTable("get_userprojects", CommandType.StoredProcedure); if (DT.Rows.Count > 0) { GridView1.DataSource = DT; GridView1.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", ex.Message.ToString(), true); } }
protected void bindTopDownloads() { try { objcommon = new clsCommonHelper(); DT = new DataTable(); DT = objcommon.FillDataTable("get_top_downloads", CommandType.StoredProcedure); if (DT.Rows.Count > 0) { //gd_topdownloads.DataSource = DT; //gd_topdownloads.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Exception", "alert('" + ex.Message + "');", true); } }
protected void bindSongGrid(string singerId) { try { objcommon = new clsCommonHelper(); DT = new DataTable(); DT = objcommon.FillDataTable("Get_Song_Singer_Wise", singerId.ToString().Trim()); if (DT.Rows.Count > 0) { gd_songs.DataSource = DT; gd_songs.DataBind(); } } catch (Exception ex) { Label1.Text = ex.Message.ToString(); Label1.ForeColor = Color.Red; } }
protected void bindRealtedSingers(string singerId) { try { objcommon = new clsCommonHelper(); DT = new DataTable(); DT = objcommon.FillDataTable("Get_related_singers", singerId); if (DT.Rows.Count > 0) { gd_realtedsingers.DataSource = DT; gd_realtedsingers.DataBind(); } } catch (Exception ex) { Label1.Text = ex.Message.ToString(); Label1.ForeColor = Color.Red; } }
protected void bindPopularSingerGrid() { try { objcommon = new clsCommonHelper(); DT = new DataTable(); DT = objcommon.FillDataTable("Get_Popular_Singer", CommandType.StoredProcedure); if (DT.Rows.Count > 0) { GD_Singers.DataSource = DT; GD_Singers.DataBind(); } } catch (Exception ex) { Label1.Text = ex.Message.ToString(); Label1.ForeColor = Color.Red; } }