Пример #1
0
        public DataTable ObtenerFeriados()
        {
            DataTable dtbFeriado = new DataTable();

            ServicioProperTime.ServicioProperTimeClient objServicioProperTime;
            objServicioProperTime = new ServicioProperTime.ServicioProperTimeClient();

            try
            {
                objServicioProperTime.Open();
                dtbFeriado            = objServicioProperTime.ConsultarFeriado().Tables[0];
                dtbFeriado.PrimaryKey = new DataColumn[] { dtbFeriado.Columns[Constantes.ColumnaFeriadosCodigo] };
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (objServicioProperTime != null && objServicioProperTime.State == System.ServiceModel.CommunicationState.Opened)
                {
                    objServicioProperTime.Close();
                }
            }
            return(dtbFeriado);
        }