private HtmlTableRow CreateAssetRow(JobAsset item, HttpServerUtility server) { HtmlTableRow row = new HtmlTableRow(); string filename = Path.GetFileName(item.Filepath); row.Cells.Add(CreateCell("Job Asset: " + filename)); HtmlTableCell cell = new HtmlTableCell(); cell = new HtmlTableCell(); string url = WebUtils.ResolveVirtualPath(item.Filepath).Replace("~", ".."); cell.InnerHtml = String.Format("<a href=\"{0}\" target=\"blank\">{1}</a>", url, "Open File"); row.Cells.Add(cell); return row; }
/// <summary> /// Create a new JobAsset object. /// </summary> /// <param name="jobAssetID">Initial value of the JobAssetID property.</param> /// <param name="filepath">Initial value of the Filepath property.</param> /// <param name="jobID">Initial value of the JobID property.</param> public static JobAsset CreateJobAsset(global::System.Int32 jobAssetID, global::System.String filepath, global::System.Int32 jobID) { JobAsset jobAsset = new JobAsset(); jobAsset.JobAssetID = jobAssetID; jobAsset.Filepath = filepath; jobAsset.JobID = jobID; return jobAsset; }
/// <summary> /// Deprecated Method for adding a new object to the JobAssets EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToJobAssets(JobAsset jobAsset) { base.AddObject("JobAssets", jobAsset); }
private static HtmlTableRow CreateAssetRow(JobAsset item, HttpServerUtility server) { HtmlTableRow row = new HtmlTableRow(); string filename = Path.GetFileName(item.Filepath); row.Cells.Add(CreateCell("Job Asset: " + filename)); HtmlTableCell cell = new HtmlTableCell(); cell = new HtmlTableCell(); LinkButton button = new LinkButton(); button.Text = "Open File"; button.OnClientClick = "OFButton_Click(\"" + WebUtils.ResolveVirtualPath(item.Filepath) + "\");"; cell.Controls.Add(button); row.Cells.Add(cell); return row; }