public DataSet ViewDriverBadgesSummary() { // DataSet badges = new DataSet(); try { DataSet ds = new DriverBadgeGateway().ReadBadgesSummary(); if (ds != null) { badges.Merge(ds); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badges); }
public DriverBadge GetDriverBadge(int idNumber) { // DriverBadge badge = null; try { DataSet ds = new DriverBadgeGateway().ReadBadge(idNumber); if (ds != null) { BadgeDataset _badges = new BadgeDataset(); _badges.Merge(ds); badge = new DriverBadge(_badges.BadgeTable[0]); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badge); }
public DataSet ViewDriverBadges() { // DataSet badges = new DataSet(); try { DataSet ds = new DriverBadgeGateway().ReadBadges(); if (ds != null) { BadgeDataset _badges = new BadgeDataset(); _badges.Merge(ds); for (int i = 0; i < _badges.BadgeTable.Rows.Count; i++) { _badges.BadgeTable[i].HasPhoto = (!_badges.BadgeTable[i].IsPhotoNull()); _badges.BadgeTable[i].HasSignature = (!_badges.BadgeTable[i].IsSignatureNull()); } badges.Merge(_badges); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badges); }
public DataSet SearchDriverBadges(string lastName, string firstName, string location, string badgeNumber) { //Search for employees DataSet badges = new DataSet(); try { DataSet ds = new DriverBadgeGateway().SearchBadges(lastName, firstName, location, badgeNumber); if (ds != null) { BadgeDataset _badges = new BadgeDataset(); _badges.Merge(ds); for (int i = 0; i < _badges.BadgeTable.Rows.Count; i++) { _badges.BadgeTable[i].HasPhoto = (!_badges.BadgeTable[i].IsPhotoNull()); _badges.BadgeTable[i].HasSignature = (!_badges.BadgeTable[i].IsSignatureNull()); } badges.Merge(_badges); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badges); }