1
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace FineUIPro.Web.ThreeYearAction.Gateway
|
||||
{
|
||||
public partial class HSSEStandardList : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
var returnData = ServerService.GerDataFromCncec("/api/Data/GetLaw_HSSEStandardsListToSUB", null, null);
|
||||
if (returnData != null && returnData.code==1 )
|
||||
{
|
||||
var data = JsonConvert.DeserializeObject<List<Model.Law_HSSEStandardsList>>(returnData.data.ToString());
|
||||
Grid1.RecordCount = data.Count;
|
||||
Grid1.DataSource = data;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
System.Web.UI.WebControls.LinkButton lbtnUrl = ((System.Web.UI.WebControls.LinkButton)(this.Grid1.Rows[i].FindControl("lbtnUrl1")));
|
||||
string url = lbtnUrl.CommandArgument.ToString();
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
url = url.Replace('\\', '/');
|
||||
lbtnUrl.Text = BLL.UploadAttachmentService.ShowAttachment(Funs.CNCECPath, url);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user