Пример #1
0
 /// <summary>
 /// OBTENER LA LISTA DE COLABORADORES
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public List <UsuarioResponsableEntity> ListarResponsible(UsuarioResponsableEntity oBe)
 {
     using (var odr = oDa.ListarResponsible(oBe))
     {
         var oList = new List <UsuarioResponsableEntity>();
         ((IList)oList).LoadFromReader <UsuarioResponsableEntity>(odr);
         return(oList);
     }
 }
Пример #2
0
        public HttpResponseMessage ListarResponsible(UsuarioResponsableEntity oBe)
        {
            try
            {
                if (string.IsNullOrWhiteSpace((string)HttpContext.Current.Session["username"]))
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, "Acceso no autorizado."));
                }

                var oBr   = new ResponsibleRule();
                var oList = oBr.ListarResponsible(oBe);
                return(Request.CreateResponse(HttpStatusCode.OK, oList));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }
Пример #3
0
 public IDataReader ListarResponsible(UsuarioResponsableEntity oBe)
 {
     try
     {
         oDb  = oDg.getDataBase();
         oCon = oDg.getConnection();
         if (oCon.State == ConnectionState.Closed)
         {
             oCon.Open();
         }
         var ocmd = oDb.GetStoredProcCommand("up_ListarResponsable", oBe.USU_RESP_Description);
         ocmd.CommandTimeout = 2000;
         var odr = oDb.ExecuteReader(ocmd);
         return(odr);
     }
     finally
     {
         oCon.Close();
     }
 }