public bool AddVendorDepartment(string name) { //Add a new department bool created = false; try { created = new VendorBadgeGateway().CreateDepartment(name); } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } return(created); }
public DataSet GetVendorStatusList() { // DataSet list = null; try { list = new VendorBadgeGateway().ReadStatusList(); } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(list); }
public bool UpdateVendorBadge(VendorBadge badge) { //Update an existing badge bool updated = false; try { updated = new VendorBadgeGateway().UpdateBadge(badge); } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(updated); }
public bool AddVendorBadge(VendorBadge badge) { //Add a new badge bool added = false; try { added = new VendorBadgeGateway().CreateBadge(badge); } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(added); }
public DataSet SearchVendorBadges(string lastName, string firstName, string location, string badgeNumber) { //Search for badges DataSet badges = new DataSet(); try { DataSet ds = new VendorBadgeGateway().SearchBadges(lastName, firstName, location, badgeNumber); if (ds != null) { badges.Merge(ds); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badges); }
public DataSet ViewVendorBadgesSummary() { // DataSet badges = new DataSet(); try { DataSet ds = new VendorBadgeGateway().ReadBadgesSummary(); if (ds != null) { badges.Merge(ds); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badges); }
public VendorBadge GetVendorBadge(int idNumber) { // VendorBadge badge = null; try { DataSet ds = new VendorBadgeGateway().ReadBadge(idNumber); if (ds != null) { BadgeDataset _badges = new BadgeDataset(); _badges.Merge(ds); badge = new VendorBadge(_badges.BadgeTable[0]); } } catch (Exception ex) { throw new FaultException <HRFault>(new HRFault(ex.Message), "Service Error"); } return(badge); }