/*Metodo para pasar las credenciales y tener acceso a la carpeta MiPyme_Files*/ //NetworkCredential _NetworkCredential = new NetworkCredential(AccessFiles.sUsuario, AccessFiles.sContraseña); //string PathFolderShared = @"\\192.169.143.34\Data_Files"; //public FSeguimientoFolios(int iFolio) //{ // InitializeComponent(); // informacion(iFolio); //} /*Función para consultar si existen grabaciones del folio*/ public void informacion(int ifolio) { scFoliosAbiertos.Controls.Clear(); Llamada caso = new Llamada().InformacionCaso(ifolio); //LABEL QUE MUESTRA EL FOLIO QUE SE ESTA MOSTRANDO DETALLADAMENTE Label lblTitulo = new Label(); lblTitulo.Text = "Detalles Folio " + caso.iIdFolio; lblTitulo.Location = new Point(14, 18); //29, 8 lblTitulo.Font = new Font("Calibri Light", 14); //122,23 lblTitulo.Anchor = AnchorStyles.Left | AnchorStyles.Top; lblTitulo.TextAlign = ContentAlignment.TopLeft; lblTitulo.Width = 150; //LABEL QUE MUESTRA EL MOTIVO DE LA LLAMADA Label lblMotivo = new Label(); lblMotivo.Text = string.Format("Tipo de Llamada{0}{1}", Environment.NewLine, caso.sMotivo); lblMotivo.Location = new Point(30, 55); //480, 8 lblMotivo.Font = new Font("Calibri Light", 13); //122,23 lblMotivo.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left; lblMotivo.TextAlign = ContentAlignment.TopLeft; lblMotivo.Width = 150; lblMotivo.Height = 45; //LABEL QUE MUESTRA LA FECHA DE SOLICITUD DEL FOLIO Label lblFechaCreacion = new Label(); lblFechaCreacion.Text = string.Format("Fecha de Solicitud{0}{1}", Environment.NewLine, caso.dtFechaCreacion); lblFechaCreacion.Location = new Point(657, 55); //657, 8 lblFechaCreacion.Font = new Font("Calibri Light", 13); //122,23 lblFechaCreacion.Anchor = AnchorStyles.Left | AnchorStyles.Top; lblFechaCreacion.TextAlign = ContentAlignment.TopLeft; lblFechaCreacion.Width = 220; lblFechaCreacion.Height = 45; //LABEL QUE MUESTRA LA FECHA DE CIERRE DEL FOLIO Label lblFechaCierre = new Label(); lblFechaCierre.Text = string.Format("Fecha de Cierre{0}{1}", Environment.NewLine, caso.sFechaCierre); lblFechaCierre.Location = new Point(657, 120); //657, 8 lblFechaCierre.Font = new Font("Calibri Light", 13); //122,23 lblFechaCierre.Anchor = AnchorStyles.Left | AnchorStyles.Top; lblFechaCierre.TextAlign = ContentAlignment.TopLeft; lblFechaCierre.Width = 220; lblFechaCierre.Height = 45; //LABEL QUE MUESTRA EL NÚMERO DE CLIENTE Label lblCliente = new Label(); lblCliente.Text = string.Format("No. cliente{0}{1}", Environment.NewLine, caso.sCliente); lblCliente.Location = new Point(30, 120); lblCliente.Font = new Font("Calibri Light", 13); //122,23 lblCliente.Width = 150; lblCliente.Height = 45; //LABEL QUE MUESTRA EL NOMBRE DEL CLIENTE Label lblClienteNombre = new Label(); lblClienteNombre.Text = string.Format("Cliente{0}{1} {2} {3}", Environment.NewLine, caso.sNombre, caso.sAPaterno, caso.sAMaterno); lblClienteNombre.Location = new Point(260, 120); lblClienteNombre.Font = new Font("Calibri Light", 13); //122,23 lblClienteNombre.Width = 320; lblClienteNombre.Height = 45; //LABEL QUE MUESTRA EL NOMBRE DEL CONTADOR ASIGNADO Label lblContador = new Label(); lblContador.Text = string.Format("Contador{0}{1} {2} {3}", Environment.NewLine, caso.sContadorNombre, caso.sContadorAPaterno, caso.sContadorAMaterno); lblContador.Location = new Point(260, 55); //29, 8 lblContador.Font = new Font("Calibri Light", 13); //122,23 lblContador.Anchor = AnchorStyles.Left | AnchorStyles.Top; lblContador.TextAlign = ContentAlignment.TopLeft; lblContador.Width = 320; lblContador.Height = 45; //CONTROL RICHTEXTBOX DONDE SE MUESTRA LA DESCRIPCIÓN DEL FOLIO RichTextBox txtComentario = new RichTextBox(); txtComentario.Text = string.Format("Comentario{0}{1}", Environment.NewLine, caso.sDescripcion); txtComentario.Location = new Point(30, 194); //29, 8 txtComentario.Font = new Font("Calibri Light", 13); //122,23 txtComentario.Width = 845; //845 txtComentario.Height = 65; txtComentario.Anchor = AnchorStyles.Left | AnchorStyles.Right; txtComentario.BorderStyle = BorderStyle.None; txtComentario.ReadOnly = true; txtComentario.BackColor = Color.White; txtComentario.Enabled = false; Label lblHistorial = new Label(); lblHistorial.Location = new Point(30, 260); lblHistorial.Text = "Llamadas"; lblHistorial.Font = new Font("Calibri Light", 14); lblHistorial.ForeColor = Color.FromArgb(105, 105, 105); Panel pnlLinea = new Panel(); pnlLinea.Location = new Point(30, 285); pnlLinea.BackColor = Color.FromArgb(236, 240, 241); pnlLinea.Width = 900; //620 pnlLinea.Height = 1; pnlLinea.BorderStyle = BorderStyle.None; //CONTROL SPLITCONTAINER DONDE SE MOSTRARAN LAS GRABACIONES SplitContainer sCGrabaciones = new SplitContainer(); sCGrabaciones.Name = "sCGrabaciones"; sCGrabaciones.Location = new Point(30, 295); sCGrabaciones.Width = 410; //620//845 sCGrabaciones.Height = 180; sCGrabaciones.Anchor = AnchorStyles.Left | AnchorStyles.Right; sCGrabaciones.BackColor = Color.FromArgb(236, 240, 241); sCGrabaciones.BackColor = Color.FromArgb(236, 240, 241); sCGrabaciones.BackColor = Color.White; sCGrabaciones.SplitterWidth = 2; sCGrabaciones.SplitterDistance = 180; //using (new NetworkConnection(PathFolderShared, _NetworkCredential)) //{ //OBTIENE UNA LISTA DE ARCHIVOS CON EXTENCIÓN DESDE UN DIRECTORIO Y SE AGREGAN A UNA LISTA DirectoryInfo _DirectoryInfo = new DirectoryInfo(@"\\192.168.1.34\Documentos\" + LogicaCC.ConnectionString.FolderConnection + @"\Documentos\Grabaciones"); IEnumerable <FileInfo> fileList = _DirectoryInfo.GetFiles("*.WAV", SearchOption.AllDirectories); sCGrabaciones.Panel1.Controls.Clear(); // StopPlayer(); int g = 0; foreach (FileInfo fi in fileList.Where(fi => fi.Name.Contains("Folio-" + caso.iIdFolio + "-")).OrderByDescending(fi => fi.Name)) { // StopPlayer(); g++; //BOTON QUE SE GENERA POR CADA ARCHIVO ENCONTRADO DE LA LISTA DE DOCUMENTPS FILTRADOS Button btnGrabacion = new Button(); btnGrabacion.Location = new Point(0, 24 * g + -23); //(0, 24 * g + 0); btnGrabacion.Name = fi.FullName; btnGrabacion.Text = " " + fi.Name; btnGrabacion.Font = new Font("Segoe UI", 9); btnGrabacion.ForeColor = Color.FromArgb(105, 105, 105); btnGrabacion.Width = 180; //225 btnGrabacion.Height = 24; btnGrabacion.TextAlign = ContentAlignment.MiddleLeft; btnGrabacion.Cursor = Cursors.Hand; btnGrabacion.FlatStyle = FlatStyle.Flat; btnGrabacion.FlatAppearance.BorderSize = 0; btnGrabacion.Image = Properties.Resources.microphone_16px; btnGrabacion.ImageAlign = ContentAlignment.TopLeft; btnGrabacion.TextImageRelation = TextImageRelation.ImageBeforeText; btnGrabacion.AutoEllipsis = true; //EVENTO CLICK DEL BOTON GRABACIÓN btnGrabacion.Click += (s, ev) => { StopPlayer(); sCGrabaciones.Panel2.Controls.Clear(); //TITULO DE LA GRABACIÓN Label lblGrabacion = new Label(); lblGrabacion.Location = new Point(100, 30); lblGrabacion.Text = "Grabación"; lblGrabacion.Font = new Font("Calibri Light", 10); lblGrabacion.ForeColor = Color.FromArgb(105, 105, 105); //NOMBRE DE LA GRABACIÓN Label lblNombreGrabacion = new Label(); lblNombreGrabacion.Location = new Point(45, 4); lblNombreGrabacion.Text = fi.Name; lblNombreGrabacion.Font = new Font("Calibri Light", 10); lblNombreGrabacion.ForeColor = Color.FromArgb(105, 105, 105); lblNombreGrabacion.Width = 220; lblNombreGrabacion.Height = 20; //CONTROL LINK PARA REPRODUCIR LAS GRABACIONES Bitmap play_25px = Properties.Resources.play_25px; Bitmap stop_25px = Properties.Resources.stop_25px; MetroFramework.Controls.MetroLink lnkPlayer = new MetroFramework.Controls.MetroLink(); lnkPlayer.Image = play_25px; lnkPlayer.Location = new Point(120, 50); lnkPlayer.ImageSize = 25; lnkPlayer.Width = 25; lnkPlayer.Height = 25; lnkPlayer.Cursor = Cursors.Hand; //CONTROL PARA REPRODUCIR AUDIO AxWindowsMediaPlayer axWindowsMediaPlayer1 = new AxWindowsMediaPlayer(); axWindowsMediaPlayer1.Location = new Point(30, 85); //(485, 85); axWindowsMediaPlayer1.Width = 190; axWindowsMediaPlayer1.Height = 50; //ACTUALIZAR EL ICONO AL TERMINAR LA REPRODUCCION axWindowsMediaPlayer1.PlayStateChange += (object senderr, _WMPOCXEvents_PlayStateChangeEvent es) => { if (es.newState == 8) { lnkPlayer.Image = play_25px; lnkPlayer.Refresh(); } }; Panel pnl1 = new Panel(); pnl1.BackColor = Color.White; pnl1.Location = new Point(30, 83); pnl1.Width = 170; pnl1.Height = 10; Panel pnl2 = new Panel(); pnl2.BackColor = Color.White; pnl2.Location = new Point(30, 103); pnl2.Width = 170; pnl2.Height = 34; Panel pnl3 = new Panel(); pnl3.BackColor = Color.White; pnl3.Location = new Point(30, 83); pnl3.Width = 28; pnl3.Height = 50; Panel pnl4 = new Panel(); pnl4.BackColor = Color.White; pnl4.Location = new Point(195, 83); //420, 37 pnl4.Width = 28; pnl4.Height = 50; //EVENTO CLICK DEL CONTROL METROLINK lnkPlayer.Click += (se, eva) => { string path = btnGrabacion.Name; axWindowsMediaPlayer1.URL = path; if (lnkPlayer.Image == play_25px) { lnkPlayer.Image = stop_25px; axWindowsMediaPlayer1.Ctlcontrols.play(); } else { lnkPlayer.Image = play_25px; axWindowsMediaPlayer1.Ctlcontrols.stop(); } }; sCGrabaciones.Panel2.Controls.Add(lnkPlayer); sCGrabaciones.Panel2.Controls.Add(lblNombreGrabacion); sCGrabaciones.Panel2.Controls.Add(lblGrabacion); sCGrabaciones.Panel2.Controls.Add(pnl1); sCGrabaciones.Panel2.Controls.Add(pnl2); sCGrabaciones.Panel2.Controls.Add(pnl3); sCGrabaciones.Panel2.Controls.Add(pnl4); sCGrabaciones.Panel2.Controls.Add(axWindowsMediaPlayer1); }; sCGrabaciones.Panel1.Controls.Add(btnGrabacion); } //} //AGREGAMOS LOS CONTROLES AL PANEL 2 scFoliosAbiertos.Controls.Add(lblTitulo); scFoliosAbiertos.Controls.Add(lblMotivo); scFoliosAbiertos.Controls.Add(lblFechaCreacion); scFoliosAbiertos.Controls.Add(lblFechaCierre); scFoliosAbiertos.Controls.Add(lblCliente); scFoliosAbiertos.Controls.Add(lblClienteNombre); scFoliosAbiertos.Controls.Add(lblContador); scFoliosAbiertos.Controls.Add(txtComentario); scFoliosAbiertos.Controls.Add(lblHistorial); scFoliosAbiertos.Controls.Add(pnlLinea); //scFoliosAbiertos.Panel2.Controls.Add(sCHistorial); scFoliosAbiertos.Controls.Add(sCGrabaciones); }
/// <summary> /// Builds the entity with all its parameters. /// </summary> /// <param name="call">Object Llamada-type.</param> /// <param name="costo">Price of the call.</param> public Local(Llamada call, float costo) : this(call.NroOrigen, call.NroDestino, call.Duracion, costo) { }
public Object traeLlamadas(ParseTreeNode raiz) { String eti = raiz.Term.Name; switch (eti) { case "LLAMADAID_OBJ": { if (raiz.ChildNodes.Count > 0) { Accesos acceso = new Accesos(0, 0, this.clase); acceso.SetArchivoOrigen(archivo); foreach (ParseTreeNode n in raiz.ChildNodes) { Expresion ex = (Expresion)traeLlamadas(n); if (ex != null) { acceso.AddExpresion(ex); } } return(acceso); } break; } case "LLAMADA": { if (raiz.ChildNodes.Count == 2) { if (raiz.ChildNodes.ElementAt(1).ToString().Equals("L_EXPRE")) { String id = raiz.ChildNodes.ElementAt(0).Token.Text.ToLower(); //MINUSCULAS int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Llamada llam = new Llamada(id, linea, col, this.clase); llam.SetArchivoOrigen(archivo); if (raiz.ChildNodes.ElementAt(1).ChildNodes.Count > 0) //SI EL HIJO DERECHO TIENE MAS DE UN HIJO ENTONCES LO RECORRO COMO EXP { foreach (ParseTreeNode n in raiz.ChildNodes.ElementAt(1).ChildNodes) { Expresion aux = (Expresion)recorreExpresion(n); //LOS TOMO... if (aux != null) //SI NO ES NULL... { llam.AddExpresion(aux); //LO ANADO } } } return(llam); } else if (raiz.ChildNodes.ElementAt(1).ToString().Equals("DIMS")) { //NECESITO HACER LA EXPRESION PARA ACCESO A ARREGLO // id + DIMS String id = raiz.ChildNodes.ElementAt(0).Token.Text.ToLower(); int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; List <Expresion> expresiones = (List <Expresion>)getDimensiones(raiz.ChildNodes.ElementAt(1)); if (expresiones != null) { ValorArreglo val = new ValorArreglo(id, expresiones, linea, col, clase); return(val); } } } else if (raiz.ChildNodes.Count == 3) { if (raiz.ChildNodes.ElementAt(0).ToString().Contains("obtener") || raiz.ChildNodes.ElementAt(0).ToString().Contains("buscar")) { String id = raiz.ChildNodes.ElementAt(0).Token.Text.ToLower(); //MINUSCULAS int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Llamada llam = new Llamada(id, linea, col, this.clase); ASTTreeExpresion ar = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion uno = (Expresion)ar.ConstruyeASTExpresion(); ar = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(2), clase, archivo); Expresion dos = (Expresion)ar.ConstruyeASTExpresion(); if (uno != null && dos != null) { llam.AddExpresion(uno); llam.AddExpresion(dos); return(llam); } } } break; } case "identificador": { int linea = raiz.Token.Location.Line; int col = raiz.Token.Location.Column; String id = raiz.Token.Text.ToLower();//MINUSCULAS Identificador ide = new Identificador(id, col, linea, this.clase); ide.SetArchivoOrigen(archivo); return(ide); } case "DECLARACION_OBJ": { if (raiz.ChildNodes.Count == 3) { String tipo = (String)dameTipo(raiz.ChildNodes.ElementAt(1)); List <Expresion> parametros = new List <Expresion>(); foreach (ParseTreeNode nodo in raiz.ChildNodes.ElementAt(2).ChildNodes) { Expresion aux = (Expresion)recorreExpresion(nodo); if (aux != null) { parametros.Add(aux); } } if (tipo != null) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; NuevoObjeto ob = new NuevoObjeto(parametros, tipo, linea, col, this.clase); ob.SetArchivoOrigen(archivo); return(ob); } } break; } case "DECLARACION_ARR": { if (raiz.ChildNodes.Count == 3) { String tipo = (String)dameTipo(raiz.ChildNodes.ElementAt(1));//OBTENGO EL TIPO DEL ARREGLO int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; List <Expresion> dimensiones = (List <Expresion>)getDimensiones(raiz.ChildNodes.ElementAt(2)); //OBTENGO LAS DIMENSIONES if (tipo != null) { NuevoArreglo nuev = new NuevoArreglo(tipo, dimensiones, linea, col, clase); return(nuev); } } break; } case "OPCS_NUEVO": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int colum = raiz.ChildNodes.ElementAt(0).Token.Location.Column; NuevoListadoOpcs opcs = new NuevoListadoOpcs(this.clase.ToLower(), linea, colum); return(opcs); } break; } case "FUN_CADENA": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; ASTTreeExpresion arbol = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion exp = (Expresion)arbol.ConstruyeASTExpresion(); if (exp != null) { ACadena cad = new ACadena(exp, clase, linea, col); return(cad); } } break; } case "FUN_SUBCAD": { if (raiz.ChildNodes.Count == 4) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; ASTTreeExpresion arbol = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion cadena = (Expresion)arbol.ConstruyeASTExpresion(); arbol = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(2), clase, archivo); Expresion num1 = (Expresion)arbol.ConstruyeASTExpresion(); arbol = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(3), clase, archivo); Expresion num2 = (Expresion)arbol.ConstruyeASTExpresion(); if (cadena != null && num1 != null && num2 != null) { SubCade s = new SubCade(cadena, num1, num2, linea, col, clase); return(s); } } break; } case "FUN_POSCAD": { if (raiz.ChildNodes.Count == 3) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; ASTTreeExpresion arbol = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion cadena = (Expresion)arbol.ConstruyeASTExpresion(); arbol = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(2), clase, archivo); Expresion posicion = (Expresion)arbol.ConstruyeASTExpresion(); if (cadena != null && posicion != null) { PosCade posca = new PosCade(cadena, posicion, clase, linea, col); return(posca); } } break; } case "FUN_BOOLEAN": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; ASTTreeExpresion expr = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion expresion = (Expresion)expr.ConstruyeASTExpresion(); if (expresion != null) { return(new ABooleano(expresion, clase, linea, col)); } } break; } case "FUN_ENTERO": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; ASTTreeExpresion expr = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion expresion = (Expresion)expr.ConstruyeASTExpresion(); if (expresion != null) { return(new AEntero(expresion, clase, linea, col)); } } break; } case "FUN_TAM": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; ASTTreeExpresion expr = new ASTTreeExpresion(raiz.ChildNodes.ElementAt(1), clase, archivo); Expresion expresion = (Expresion)expr.ConstruyeASTExpresion(); if (expresion != null) { FunTam f = new FunTam(expresion, clase, linea, col); return(f); } } break; } case "FUN_RANDOM": { if (raiz.ChildNodes.Count == 1) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; FunRandom r = new FunRandom(clase, linea, col); return(r); } else if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; List <Expresion> exp = new List <Expresion>(); foreach (ParseTreeNode nodo in raiz.ChildNodes.ElementAt(1).ChildNodes) { Expresion aux = (Expresion)recorreExpresion(nodo); if (aux != null) { exp.Add(aux); } } FunRandom r = new FunRandom(exp, clase, linea, col); return(r); } break; } case "FUN_MIN": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; if (raiz.ChildNodes.ElementAt(1).ToString().Equals("L_EXPRE")) { List <Expresion> expresiones = new List <Expresion>(); foreach (ParseTreeNode nodo in raiz.ChildNodes.ElementAt(1).ChildNodes) { Expresion exp = (Expresion)recorreExpresion(nodo); if (exp != null) { expresiones.Add(exp); } } ///AQUI RETORNO FunMin f = new FunMin(expresiones, clase, linea, col); return(f); } else { String idArreglo = raiz.ChildNodes.ElementAt(1).Token.Text.ToLower(); FunMin f = new FunMin(idArreglo.ToLower(), clase, linea, col); return(f); } } break; } case "FUN_MAX": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; if (raiz.ChildNodes.ElementAt(1).ToString().Equals("L_EXPRE")) { List <Expresion> expresiones = new List <Expresion>(); foreach (ParseTreeNode nodo in raiz.ChildNodes.ElementAt(1).ChildNodes) { Expresion exp = (Expresion)recorreExpresion(nodo); if (exp != null) { expresiones.Add(exp); } } /// AQUI RETORNO FunMax f = new FunMax(expresiones, clase, linea, col); return(f); } else { String idArreglo = raiz.ChildNodes.ElementAt(1).Token.Text.ToLower(); FunMax f = new FunMax(idArreglo.ToLower(), clase, linea, col); return(f); } } break; } case "FUN_POW": { if (raiz.ChildNodes.Count == 3) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion bas = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); Expresion pot = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(2)); if (bas != null && pot != null) { FunPow po = new FunPow(bas, pot, clase, linea, col); return(po); } } break; } case "FUN_LOG": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { Logaritmo l = new Logaritmo(exp, clase, linea, col); return(l); } } break; } case "FUN_LOG10": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { LogTen l = new LogTen(exp, clase, linea, col); return(l); } } break; } case "FUN_ABS": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { FunAbs abs = new FunAbs(exp, clase, linea, col); return(abs); } } break; } case "FUN_SIN": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { Seno s = new Seno(exp, clase, linea, col); return(s); } } break; } case "FUN_COS": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { Coseno c = new Coseno(exp, clase, linea, col); return(c); } } break; } case "FUN_TAN": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { Tangente t = new Tangente(exp, clase, linea, col); return(t); } } break; } case "FUN_SQRT": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { Raiz r = new Raiz(exp, clase, linea, col); return(r); } } break; } case "FUN_PI": { if (raiz.ChildNodes.Count == 1) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Pi p = new Pi(clase, linea, col); return(p); } break; } case "FUN_HOY": { if (raiz.ChildNodes.Count == 1) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; FunHoy hoy = new FunHoy(clase, linea, col); return(hoy); } break; } case "FUN_AHORA": { if (raiz.ChildNodes.Count == 1) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; FunAhora ahora = new FunAhora(clase, linea, col); return(ahora); } break; } case "FUN_AFECHA": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { FunAFecha r = new FunAFecha(exp, clase, linea, col); return(r); } } break; } case "FUN_TOHORA": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { FunToHora f = new FunToHora(exp, clase, linea, col); return(f); } } break; } case "FUN_TOFECHAHORA": { if (raiz.ChildNodes.Count == 2) { int linea = raiz.ChildNodes.ElementAt(0).Token.Location.Line; int col = raiz.ChildNodes.ElementAt(0).Token.Location.Column; Expresion exp = (Expresion)recorreExpresion(raiz.ChildNodes.ElementAt(1)); if (exp != null) { FunFechaHora f = new FunFechaHora(exp, clase, linea, col); return(f); } } break; } } return(null); }
public int UpdateLlamada(LlamadaEntity objLlamada) { return(Llamada.Edit(objLlamada)); }
public int DeleteLlamada(String BaseRemoteIp, int BaseIdUser, int?IdLlamada) { return(Llamada.Delete(IdLlamada)); }
public SoftvList <LlamadaEntity> GetLlamadaPagedListXml(int page, int pageSize, String xml) { return(Llamada.GetPagedList(page, pageSize, xml)); }
public int AddLlamada(LlamadaEntity objLlamada) { return(Llamada.Add(objLlamada)); }
public IEnumerable <LlamadaEntity> GetLlamadaList() { return(Llamada.GetAll()); }
public SoftvList <LlamadaEntity> GetLlamadaPagedList(int page, int pageSize) { return(Llamada.GetPagedList(page, pageSize)); }
public LlamadaEntity GetLlamada(int?IdLlamada) { return(Llamada.GetOne(IdLlamada)); }
public LlamadaEntity GetDeepLlamada(int?IdLlamada) { return(Llamada.GetOneDeep(IdLlamada)); }
private bool ExisteEnBaseDato() { Llamada llamada = LlamadaBLL.Buscar(Convert.ToInt32(IdTextbox.Text)); return(llamada != null); }
public void UpdateLlamada(Llamada Llamada) { _repo.Update(Llamada); _repo.Save(); }
public Resultado resolver(Contexto ctx) { String tipo = izq.ToString(); Resultado res = new Resultado(); switch (tipo) { case Constantes.LOGICA: if (izq.ChildNodes.Count == 3) { res = new Logica(izq.ChildNodes[0], izq.ChildNodes[2], izq.ChildNodes[1].Token.Text).resolver(ctx); } else if (izq.ChildNodes.Count == 2) { res = new Logica(izq.ChildNodes[1], izq.ChildNodes[0].Token.Text).resolver(ctx); } else { res = new Expresion(izq.ChildNodes[0]).resolver(ctx); } break; case Constantes.RELACIONAL: if (izq.ChildNodes.Count == 3) { res = new Relacional(izq.ChildNodes[0], izq.ChildNodes[2], izq.ChildNodes[1].Token.Text).resolver(ctx); } else { res = new Expresion(izq.ChildNodes[0]).resolver(ctx); } break; case Constantes.ARITMETICA: if (izq.ChildNodes.Count == 3) { res = new Aritmetica(izq.ChildNodes[0], izq.ChildNodes[2], izq.ChildNodes[1].Token.Text).resolver(ctx); } else if (izq.ChildNodes.Count == 2) { res = new Aritmetica(izq.ChildNodes[1], izq.ChildNodes[0].Token.Text).resolver(ctx); } else { res = new Expresion(izq.ChildNodes[0]).resolver(ctx); } break; case Constantes.VALOR: res = new Expresion(izq.ChildNodes[0]).resolver(ctx); break; case Constantes.PRIMITIVO: res = new Expresion(izq.ChildNodes[0]).resolver(ctx); break; case Constantes.LLAMADA: res = new Llamada(izq).ejecutar(ctx, 1); break; case Constantes.ID: String nombreVar = izq.ChildNodes[0].Token.Text; Variable var = Instrucciones.InstruccionAbstracta.obtenerVariable(ctx, nombreVar); if (var == null) { return(new Resultado()); } res = new Resultado(var.Valor, var.Tipo); break; case Constantes.TRUE: res = new Resultado(izq.ChildNodes[0].Token.Text, Constantes.T_BOOL); break; case Constantes.FALSE: res = new Resultado(izq.ChildNodes[0].Token.Text, Constantes.T_BOOL); break; default: String _tipo = izq.Term.ToString(); String cad = izq.Token.Text; if (_tipo.CompareTo(Constantes.T_NUM) == 0) { res = new Resultado(cad, Constantes.T_NUM); } else { res = new Resultado(cad.Substring(1, cad.Length - 2), Constantes.T_STR); } break; } return(res); }
public RegistroDetalle() { InitializeComponent(); llamada = new Llamada(); this.DataContext = this; }
private bool ExisteEnBaseDatos() { Llamada llamada = LlamadasBLL.Buscar(this.llamada.LlamadaId); return(llamada != null); }