protected void LoadReports(int rid, int userid, string username) { switch (rid) { case 1: lblDetailDate.Text = DateTime.Now.ToShortDateString(); pnl_EmployeeDetailReport.Visible = true; EmployeeDetailReport.LoadPTODetailsToDate(userid, username); break; case 2: pnl_EmployeeBalanceReport.Visible = true; EmployeeBalanceReport.LoadEmployeeBalanceReport(userid); break; case 3: lblBalanceDate.Text = DateTime.Now.ToShortDateString(); pnl_ScheduledPTO.Visible = true; ScheduledPTO.LoadScheduledPTO(userid, username); break; default: break; } }
protected void rptEmployeeDetailReport_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView employee = (DataRowView)e.Item.DataItem; EmployeeDetailReport control = (EmployeeDetailReport)e.Item.FindControl("EmployeeDetailReport"); control.LoadPTODetailsToDate(Convert.ToInt32(employee["userid"]), Convert.ToString(employee["name"])); } }