Example #1
0
        // roly


        public IDataReader SHPR_TICKET_PRO(ProblemTypeEntity oBe)
        {
            try
            {
                oDb  = oDg.getDataBase();
                oCon = oDg.getConnection();
                if (oCon.State == ConnectionState.Closed)
                {
                    oCon.Open();
                }
                var ocmd = oDb.GetStoredProcCommand("up_ListarTipoProblema", oBe.PRO_Id, oBe.SER_Id);
                ocmd.CommandTimeout = 2000;
                var odr = oDb.ExecuteReader(ocmd);
                return(odr);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oCon.Close();
            }

            //
        }
Example #2
0
 public List <ProblemTypeEntity> SHPR_TICKET_PRO_LIST(ProblemTypeEntity oBe)
 {
     using (var odr = oDa.SHPR_TICKET_PRO(oBe))
     {
         var oList = new List <ProblemTypeEntity>();
         ((IList)oList).LoadFromReader <ProblemTypeEntity>(odr);
         return(oList);
     }
 }
        public HttpResponseMessage P0005SHPR_PRO_LIST(ProblemTypeEntity oBe)
        {
            try
            {
                if (string.IsNullOrWhiteSpace((string)HttpContext.Current.Session["username"]))
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, "Acceso no autorizado."));
                }

                var oBr   = new TicketRule();
                var oList = oBr.SHPR_TICKET_PRO_LIST(oBe);
                return(Request.CreateResponse(HttpStatusCode.OK, oList));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }
Example #4
0
 /// <summary>
 /// OBTENER LA LISTA DE TIPOS DE PROBLEMA
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public IDataReader SHPR_PROBLEM_TYPE_LIST(ProblemTypeEntity oBe)
 {
     try
     {
         oDb  = oDg.getDataBase();
         oCon = oDg.getConnection();
         if (oCon.State == ConnectionState.Closed)
         {
             oCon.Open();
         }
         var ocmd = oDb.GetStoredProcCommand("usp_TipoProblema");
         ocmd.CommandTimeout = 2000;
         var odr = oDb.ExecuteReader(ocmd);
         return(odr);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         oCon.Close();
     }
 }