// Lấy bảng giá tại thời điểm protected DailyCostTable GetCurrentDailyTable(DateTime date) { if (_dailyTable == null || _dailyTable.ValidTo < date) { _dailyTable = Module.DailyCostTableGetValid(date); } if (_dailyTable == null && Module.HasRunningCost) { throw new Exception(string.Format("Không có bảng giá chuyến cho {0:dd/MM/yyyy}", date)); } return(_dailyTable); }
protected void rptCostingTable_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.DataItem is DailyCostTable) { DailyCostTable table = (DailyCostTable)e.Item.DataItem; Literal litValidFrom = e.Item.FindControl("litValidFrom") as Literal; if (litValidFrom != null) { litValidFrom.Text = table.ValidFrom.ToString("dd/MM/yyyy"); } HyperLink hyperLinkEdit = e.Item.FindControl("hyperLinkEdit") as HyperLink; if (hyperLinkEdit != null) { hyperLinkEdit.NavigateUrl = string.Format("DailyExpenseConfig.aspx?NodeId={0}&SectionId={1}&TableId={2}", Node.Id, Section.Id, table.Id); } } }