Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
        }
Exemple #7
0
        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);
        }