Ejemplo n.º 1
0
        public static UpdateUsers GetUpdateUsers(string routeClass)
        {
            //
            UpdateUsers users = null;

            try {
                _Client = new RoadshowServiceClient();
                users   = _Client.GetUpdateUsers(routeClass);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetUpdateUsers() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetUpdateUsers() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetUpdateUsers() communication error.", ce); }
            return(users);
        }
Ejemplo n.º 2
0
        public UpdateUsers GetUpdateUsers(string routeClass)
        {
            //
            UpdateUsers users = null;

            try {
                users = new UpdateUsers();
                DataSet ds = fillDataset(USP_UPDATEDBY, TBL_UPDATEDBY, new object[] { routeClass });
                if (ds != null)
                {
                    RoadshowDS _users = new RoadshowDS();
                    _users.UpdatedByTable.Merge(ds.Tables[TBL_UPDATEDBY]);
                    for (int i = 0; i < _users.UpdatedByTable.Rows.Count; i++)
                    {
                        users.Add(new UpdateUser(_users.UpdatedByTable[i]));
                    }
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading update users.", ex); }
            return(users);
        }