コード例 #1
0
        public ActionResult getAllServicios()
        {
            var            lista         = proxycon.GetConexionList();
            List <TipServ> clasificacion = new List <TipServ>();

            foreach (var item in lista)
            {
                ConexionController c = new ConexionController();
                SqlCommand         comandoSql;
                int           id           = Int32.Parse(item.IdConexion.ToString());
                SqlConnection conexionSQL2 = new SqlConnection(c.DameConexion(id));
                try
                {
                    conexionSQL2.Open();
                }
                catch
                { }
                try
                {
                    comandoSql            = new SqlCommand("SELECT * FROM TipServ WHERE Habilitar = 0");
                    comandoSql.Connection = conexionSQL2;
                    SqlDataReader reader = comandoSql.ExecuteReader();
                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            TipServ datos = new TipServ();
                            datos.clvProblema = Int32.Parse(reader[0].ToString());
                            datos.descripcion = reader[1].ToString();
                            clasificacion.Add(datos);
                        }
                    }
                }
                catch { }
            }
            var listado = clasificacion.GroupBy(x => x.descripcion).Select(y => y.First());

            return(Json(listado, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
 public int DeleteTipServ(String BaseRemoteIp, int BaseIdUser, int?Clv_TipSer)
 {
     return(TipServ.Delete(Clv_TipSer));
 }
コード例 #3
0
 public int UpdateTipServ(TipServEntity objTipServ)
 {
     return(TipServ.Edit(objTipServ));
 }
コード例 #4
0
 public int AddTipServ(TipServEntity objTipServ)
 {
     return(TipServ.Add(objTipServ));
 }
コード例 #5
0
 public SoftvList <TipServEntity> GetTipServPagedListXml(int page, int pageSize, String xml)
 {
     return(TipServ.GetPagedList(page, pageSize, xml));
 }
コード例 #6
0
 public SoftvList <TipServEntity> GetTipServPagedList(int page, int pageSize)
 {
     return(TipServ.GetPagedList(page, pageSize));
 }
コード例 #7
0
 public IEnumerable <TipServEntity> GetTipServList()
 {
     return(TipServ.GetAll());
 }
コード例 #8
0
 public TipServEntity GetDeepTipServ(int?Clv_TipSer)
 {
     return(TipServ.GetOneDeep(Clv_TipSer));
 }
コード例 #9
0
 public TipServEntity GetTipServ(int?Clv_TipSer)
 {
     return(TipServ.GetOne(Clv_TipSer));
 }