public DataTable GetRelatives() { localhost1.CronusQueryWebService dbReader = new localhost1.CronusQueryWebService(); DataTable dtbl = new DataTable(); dtbl.Columns.Add("Employee First Name"); dtbl.Columns.Add("Employee Last Name"); dtbl.Columns.Add("Employee Number"); dtbl.Columns.Add("Relative Code"); dtbl.Columns.Add("Relative First Name"); dtbl.Columns.Add("Relative Last Name"); foreach (Relative r in dbReader.GetRelatives()) { var row = dtbl.NewRow(); row["Employee First Name"] = r.empFirstName; row["Employee Last Name"] = r.empLastName; row["Employee Number"] = r.empNo_; row["Relative Code"] = r.relativeCode; row["Relative First Name"] = r.firstName; row["Relative Last Name"] = r.lastName; dtbl.Rows.Add(row); } return(dtbl); }
public DataTable GetAbsence() { localhost1.CronusQueryWebService dbReader = new localhost1.CronusQueryWebService(); DataTable dtbl = new DataTable(); dtbl.Columns.Add("Employee Number"); dtbl.Columns.Add("Employee First Name"); dtbl.Columns.Add("Employee Last Name"); dtbl.Columns.Add("From Date"); dtbl.Columns.Add("Cause of Absence"); foreach (EmployeeAbsence a in dbReader.GetAbcense()) { var row = dtbl.NewRow(); row["Employee Number"] = a.empNo_; row["Employee First Name"] = a.empFirstName; row["Employee Last Name"] = a.empLastName; row["From Date"] = a.fromDate; row["Cause of Absence"] = a.causeOfAbsenceCode; dtbl.Rows.Add(row); } return(dtbl); }
public DataTable GetColumns() { localhost1.CronusQueryWebService dbReader = new localhost1.CronusQueryWebService(); DataTable dtbl = new DataTable(); dtbl.Columns.Add("Columns"); foreach (string s in dbReader.GetColumns()) { var row = dtbl.NewRow(); row["Columns"] = s; dtbl.Rows.Add(row); } return(dtbl); }
public DataTable GetEmployees() { localhost1.CronusQueryWebService dbReader = new localhost1.CronusQueryWebService(); DataTable dtbl = new DataTable(); dtbl.Columns.Add("Employee Number"); dtbl.Columns.Add("Employee First Name"); dtbl.Columns.Add("Employee Last Name"); foreach (Employee e in dbReader.GetEmployees()) { var row = dtbl.NewRow(); row["Employee Number"] = e.no_; row["Employee First Name"] = e.firstName; row["Employee Last Name"] = e.lastName; dtbl.Rows.Add(row); } return(dtbl); }