Files
SGGL_SHJ/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseView.aspx.cs
T

73 lines
2.2 KiB
C#

using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
namespace FineUIPro.Web.HSSE.CostGoods
{
public partial class ExpenseView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string ExpenseId
{
get
{
return (string)ViewState["ExpenseId"];
}
set
{
ViewState["ExpenseId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.ExpenseId = Request.Params["ExpenseId"];
if (!string.IsNullOrEmpty(this.ExpenseId))
{
var expense = BLL.ExpenseService.GetExpenseById(this.ExpenseId);
if (expense != null)
{
if (expense != null)
{
this.ExpenseId = expense.ExpenseId;
this.drpUnit.Text = UnitService.GetUnitNameByUnitId( expense.UnitId);
this.txtYear.Text = expense.Year.ToString();
this.lbSortIndex.Text = expense.SortIndex.ToString();
}
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.ExpenseId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&menuId={1}&type=-1", ExpenseId, BLL.Const.ProjectExpenseMenuId)));
}
}
#endregion
}
}