public static Staff LoadAll(DataRow row) { Staff staff = Load(row, "staff_"); staff.Person = PersonDB.Load(row, "person_"); staff.Person.Title = IDandDescrDB.Load(row, "title_title_id", "title_descr"); staff.Field = IDandDescrDB.Load(row, "field_field_id", "field_descr"); staff.StaffPosition = StaffPositionDB.Load(row, "staff_position_"); staff.CostCentre = CostCentreDB.Load(row, "cost_centre_"); return(staff); }
public static CostCentre[] GetChildren(DataTable dt, string query) { DataRow[] foundRows = dt.Select(query); CostCentre[] children = new CostCentre[foundRows.Length]; for (int i = 0; i < foundRows.Length; i++) { CostCentre cc = CostCentreDB.Load(foundRows[i]); cc.Children = GetChildren(dt, "parent_id = " + cc.CostCentreID.ToString()); children[i] = cc; } return children; }
public static System.Collections.Hashtable GetAllInHashtable(bool incSupportStaff = false, bool showIsFired = false, bool showIsExternal = false, bool showOnlyExternal = false) { System.Collections.Hashtable hash = new System.Collections.Hashtable(); DataTable tbl = StaffDB.GetDataTable_StaffInfo(incSupportStaff, showIsFired, showIsExternal, showOnlyExternal); for (int i = 0; i < tbl.Rows.Count; i++) { Staff staff = Load(tbl.Rows[i]); staff.Person = PersonDB.Load(tbl.Rows[i]); staff.Person.Title = IDandDescrDB.Load(tbl.Rows[i], "title_id", "descr"); staff.Field = IDandDescrDB.Load(tbl.Rows[i], "field_field_id", "field_descr"); staff.StaffPosition = StaffPositionDB.Load(tbl.Rows[i], "staff_position_"); staff.CostCentre = CostCentreDB.Load(tbl.Rows[i], "cost_centre_"); hash[staff.StaffID] = staff; } return(hash); }
public static StaffOfferings LoadAll(DataRow row) { StaffOfferings so = Load(row, "so_"); so.Offering = OfferingDB.Load(row, "o_"); so.Offering.OfferingType = IDandDescrDB.Load(row, "type_offering_type_id", "type_descr"); so.Offering.Field = IDandDescrDB.Load(row, "fld_field_id", "fld_descr"); so.Offering.AgedCarePatientType = IDandDescrDB.Load(row, "acpatientcat_aged_care_patient_type_id", "acpatientcat_descr"); so.Offering.OfferingInvoiceType = IDandDescrDB.Load(row, "invtype_offering_invoice_type_id", "invtype_descr"); so.Staff = StaffDB.Load(row, "staff_"); so.Staff.Person = PersonDB.Load(row, "person_"); so.Staff.Person.Title = IDandDescrDB.Load(row, "title_title_id", "title_descr"); so.Staff.Field = IDandDescrDB.Load(row, "field_field_id", "field_descr"); so.Staff.StaffPosition = StaffPositionDB.Load(row, "staff_position_"); so.Staff.CostCentre = CostCentreDB.Load(row, "cost_centre_"); return(so); }