public static EPayrollGroup GetObject(DatabaseConnection dbConn, object ID) { if (ID is int) { EPayrollGroup obj = new EPayrollGroup(); obj.PayGroupID = (int)ID; if (db.select(dbConn, obj)) { return(obj); } } return(null); }
public EPayrollGroup Copy(DatabaseConnection dbConn) { EPayrollGroup obj = new EPayrollGroup(); obj.PayGroupID = PayGroupID; if (EPayrollGroup.db.select(dbConn, obj)) { obj.PayGroupID = 0; obj.PayGroupCode = obj.PayGroupCode + "_COPY"; obj.PayGroupDesc = "Copy of " + obj.PayGroupDesc; obj.CurrentPayPeriodID = 0; EPayrollGroup.db.insert(dbConn, obj); return(obj); } return(null); }