using BLL; using System; using System.Collections.Generic; using System.Linq; namespace FineUIPro.Web.HSSE.CostGoods { public partial class ExpenseView : PageBase { #region 定义项 /// /// 主键 /// private string ExpenseId { get { return (string)ViewState["ExpenseId"]; } set { ViewState["ExpenseId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// 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 附件上传 /// /// 上传附件 /// /// /// 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 } }