合并最新
This commit is contained in:
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Web;
|
||||
using System.Linq;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
@@ -37,16 +38,12 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.LargerHazardListId = Request.Params["LargerHazardListId"];
|
||||
ExpertArgumentService.getViewLargerHazardListItem.Clear();
|
||||
var getRecord = BLL.ExpertArgumentService.GetLargerHazardListById(LargerHazardListId);
|
||||
if (getRecord != null)
|
||||
{
|
||||
this.txtHazardCode.Text = getRecord.HazardCode;
|
||||
this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}", getRecord.RecordTime);
|
||||
this.txtVersionNo.Text = getRecord.VersionNo;
|
||||
ExpertArgumentService.getViewLargerHazardListItem = (from x in Funs.DB.View_Solution_LargerHazardListItem
|
||||
where x.LargerHazardListId == this.LargerHazardListId
|
||||
select x).ToList();
|
||||
if (getRecord.States == Const.State_1 && this.CurrUser.UserId == Const.sysglyId)
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectExpertArgumentMenuId);
|
||||
@@ -70,10 +67,13 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (ExpertArgumentService.getViewLargerHazardListItem != null)
|
||||
var getView = from x in Funs.DB.View_Solution_LargerHazardListItem
|
||||
where x.LargerHazardListId == this.LargerHazardListId
|
||||
select x;
|
||||
if (getView.Count() > 0)
|
||||
{
|
||||
Grid1.RecordCount = ExpertArgumentService.getViewLargerHazardListItem.Count();
|
||||
DataTable tb = this.GetPagedDataTable(Grid1, ExpertArgumentService.getViewLargerHazardListItem);
|
||||
Grid1.RecordCount = getView.Count();
|
||||
DataTable tb = this.GetPagedDataTable(Grid1, getView.ToList());
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -139,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
BLL.ExpertArgumentService.AddLargerHazardList(newRecord);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newRecord.HazardCode, newRecord.LargerHazardListId, BLL.Const.ProjectExpertArgumentMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
var newListItems = from x in ExpertArgumentService.getViewLargerHazardListItem
|
||||
var newListItems = from x in Funs.DB.Solution_LargerHazardListItem
|
||||
select new Model.Solution_LargerHazardListItem
|
||||
{
|
||||
LargerHazardListItemId = x.LargerHazardListItemId,
|
||||
@@ -160,5 +160,24 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("危大工程清单" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user