Exemple #1
0
        public JsonResult GetAsistencia(long pMov, long pPer)
        {
            List <Asistencia> lstAsistencias = new List <Asistencia>();

            WSTercerosLiquidaciones.TercerosLiquidacionesSoapClient wsClient = new WSTercerosLiquidaciones.TercerosLiquidacionesSoapClient();
            try
            {
                wsClient.Open();
                DataSet ds = wsClient.GetAsistencia(pMov);
                wsClient.Close();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    lstAsistencias.Add(new Asistencia(dr));
                }
            }
            catch (System.ServiceModel.FaultException ex)
            {
                logger.Error(ex.Message);
                wsClient.Abort();
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                wsClient.Abort();
            }
            return(Json(lstAsistencias, JsonRequestBehavior.AllowGet));
        }