73 lines
2.2 KiB
C#
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
|
|
}
|
|
} |