private void cargaReporterosRecuperacionGuion() { StringBuilder contenido = new StringBuilder(); wsFiatube.TDI_EMPL[] resultado = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { client = new wsFiatube.WebService_FIATubeSoapClient(); resultado = client.GetReporterosListRecuperacionGuion(); if (resultado != null && resultado.Count() > 0) { contenido.Append("<option data-val='0' val='0'>== SELECCIONE ==</option>"); foreach (wsFiatube.TDI_EMPL item in resultado) { contenido.Append("<option data-val='").Append(item.EmpleadoLlavePrimaria).Append("' val='").Append(item.EmpleadoLlavePrimaria).Append("'>").Append(item.EmpleadoNombre).Append("</option>"); } } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('No se encontraron reporteros para recuperacion de guión');", true); } ScriptManager.RegisterStartupScript(this, this.GetType(), "js", " $('#cmbReporterosRecG').empty(); $('#cmbReporterosRecG').append(\"" + contenido + "\"); ", true); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Ocurrio un problema al obtener los reporteros para recuperacion de guión: " + ex.Message + "');", true); this.logError(ex); } }
public static List <Object> getVideoRecuperacionArchivos(int cveVideoRec) { wsFiatube.ArrayOfString idVideos; List <VideoRecuperacionArchivo> resultado = new List <VideoRecuperacionArchivo>(); List <wsFiatube.VideoRecuperacion> resultado2 = new List <wsFiatube.VideoRecuperacion>(); List <object> resultadoFinal = new List <object>(); VideoRecuperacion value = new VideoRecuperacion(); WebService_RecuperaVideoSoapClient client = new WebService_RecuperaVideoSoapClient(); wsFiatube.WebService_FIATubeSoapClient clientFiatube = new wsFiatube.WebService_FIATubeSoapClient(); value.CveVideoRecuperacion = cveVideoRec; resultado = client.ConsultaVideoRecuperacionArchivos(value).ToList(); resultadoFinal.Add(resultado); if (resultado.Count > 0) { idVideos = new wsFiatube.ArrayOfString(); foreach (VideoRecuperacionArchivo item in resultado) { idVideos.Add(item.IdNombreArchivo); } resultado2 = clientFiatube.ObtenerValidacionRecuperaciones(idVideos).ToList(); } resultadoFinal.Add(resultado2); return(resultadoFinal); }
/// <summary> /// Handles the Click event of the btnUpdateData control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnUpdateData_Click(Object sender, EventArgs e) { DateTime currDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); DateTime theDate = default(DateTime); wsFiatube.THE_Monitoreo[] result = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { try { theDate = Convert.ToDateTime(dtFEve.Value); if (currDate.CompareTo(theDate) > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('La fecha no puede ser menor a la fecha actual.') ", true); return; } } catch (Exception) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('Debe especificar un valor de fecha válido.') ", true); return; } client = new wsFiatube.WebService_FIATubeSoapClient(); result = client.ObtenerMonitoreosPorDia(theDate); /*Se genera el grid con la informacion correspondiente*/ createGrid(result); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('" + "Ocurrio un problema al actualizar la información: " + ex.Message + "') ", true); this.logError(ex); } }
/// <summary> /// Handles the Click event of the btnCargaTabBusqueda control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnCargaTabBusqueda_Click(Object sender, EventArgs e) { bool isQuery = false; TDI_BUSQUEDAS info = null; wsFiatube.FastResultset resultado = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { info = (TDI_BUSQUEDAS)JsonConvert.DeserializeObject(hiddTabI.Value, typeof(TDI_BUSQUEDAS)); client = new wsFiatube.WebService_FIATubeSoapClient(); //Siempre se carga la posicion cero, porque cuando termine de cargarla es la posicion que se elimina y con esto se recorre la lista. if (isDate(info.TabNombre.Trim(), Convert.ToInt32(Session["numUsuario"]))) { isQuery = false; } else { isQuery = true; } resultado = client.ConsultaRecuperacionBusquedas(isQuery, info.DetalleBusqueda, int.MaxValue); /*Se carga el nuevo tab*/ this.creaNuevoTabInfoAcoplado(resultado, info.TabNombre); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('" + ex.Message + "');", true); this.logError(ex); } }
public static bool updateMonitor(String oMonitor) { bool resp = false; wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); resp = client.ActualizaMonitoreo(JsonConvert.DeserializeObject <wsFiatube.THE_Monitoreo>(oMonitor)); return(resp); }
public static int saveMonitor(List <THE_Monitoreo> lista) { //wsFiatube.THE_Monitoreo valores = JsonConvert.DeserializeObject<wsFiatube.THE_Monitoreo[]>(lista); int result = -1; wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); result = client.GuardaMonitoreo(lista.ToArray()); return(result); }
/// <summary> /// Handles the Click event of the btnActualizar control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnActualizar_Click(Object sender, EventArgs e) { int localId; DateTime fecha; string texto, seccion, local; wsFiatube.AgendaOT[] resultado = null; wsFiatube.TDI_LocalEmpleado[] locAsignadas = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { try { localId = int.Parse(hiddLocv.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Debe especificar una local válida.');", true); return; } try { seccion = localId == 36 ? int.Parse(hiddSecc.Value).ToString() : string.Empty; } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Debe especificar una sección válida.');", true); return; } try { fecha = Convert.ToDateTime(hiddFecA.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Debe especificar una fecha válida.');", true); return; } texto = hiddText.Value; local = hiddLocv.Value; if (seccion.Equals("0")) { seccion = string.Empty; } if (localId <= 0) { local = string.Empty; } client = new wsFiatube.WebService_FIATubeSoapClient(); /*Se obtienen las locales a las que tiene acceso el usuario*/ //locAsignadas = client.ObtenerLocalesEmpleado(int.Parse(Session["numUsuario"].ToString())); resultado = client.getAgendaOTs_LOCALES(seccion, fecha.ToString("dd/MM/yyyy"), fecha.ToString("dd/MM/yyyy"), texto, string.Empty, string.Empty, texto, String.Empty, local); IEnumerable <wsFiatube.AgendaOT> valores = resultado.Where(n => n.OtraRepl == string.Empty); if (valores == null) { resultado = null; } else { resultado = valores.ToArray(); } updateScreenData(resultado /*, locAsignadas.ToList()*/); ScriptManager.RegisterStartupScript(this, this.GetType(), "code", " applyEvents(); ", true); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Ocurrio un problema al obtener la informacion de agenda: " + ex.Message + "');", true); this.logError(ex); } }
public static bool deleteMonitor(String data) { bool result = false; wsFiatube.THE_Monitoreo monitor; wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); monitor = JsonConvert.DeserializeObject <wsFiatube.THE_Monitoreo>(new Azteca.Utility.Security.Rijndael().Transmute(data, enmTransformType.intDecrypt)); result = client.EliminarMonitoreo(monitor); return(result); }
/// <summary> /// Handles the Click event of the btnOpenAdvance control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnOpenAdvance_Click(Object sender, EventArgs e) { wsFiatube.AvanceMonitoreo value = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { value = JsonConvert.DeserializeObject <wsFiatube.AvanceMonitoreo>(new Azteca.Utility.Security.Rijndael().Transmute(hiddCurV.Value, Azteca.Utility.Security.enmTransformType.intDecrypt)); Session["dataAdvRepMon"] = value; if (value.Origen.Equals("M")) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " parent.openModal('AvancesMonitoreo/AvancesMoniSoloLectura.aspx', widhDivAvaMonSLec, heigthDivAvaMonSLec, 'Avances por Monitoreo'); ", true); } else if (value.Origen.Equals("O")) { wsFiatube.Datos_PantallaOTIpad data = null; client = new wsFiatube.WebService_FIATubeSoapClient(); data = client.ObtenerDatosPantallaOrdenTrabajo(value.LlaveFr); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " parent.openModal('OT/AvancesOT.aspx?advanceType=O&numOT=" + data.OTOrdenTrab[0].CveOrdenTrabajo + "&title=" + data.OTOrdenTrab[0].Titulo + "&oCve=" + data.OTOrdenTrab[0].ClaveOrdenTrabajo + "', widthAvancesOT, heigthAvancesOT, 'Avances OT: " + data.OTOrdenTrab[0].ClaveOrdenTrabajo + "'); ", true); } else if (value.Origen.Equals("P")) { wsFiatube.AgendaOT[] data = null; client = new wsFiatube.WebService_FIATubeSoapClient(); data = client.getAgendaOTs(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, value.LlaveFr, string.Empty, string.Empty); if (data != null && data.Length > 0) { /*Se quitan las que son replicas*/ var ListaAgendaSinReplica = from OT in data where OT.OtraRepl == "" select OT; if (ListaAgendaSinReplica.Count() > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " parent.openModal('OT/AvancesOT.aspx?advanceType=P&numOT=" + ListaAgendaSinReplica.ElementAt(0).AgseNume + "&title=" + ListaAgendaSinReplica.ElementAt(0).AgseTitu + "&oCve=" + ListaAgendaSinReplica.ElementAt(0).AgseNume + "', widthAvancesOT, heigthAvancesOT, 'Avances de Propuesta: " + ListaAgendaSinReplica.ElementAt(0).AgseNume + "'); ", true); } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('No se encontro información para mostrar el avance.') ", true); } } this.btnActualizar_Click(null, null); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('" + "Ocurrio un problema al cargar la página: " + ex.Message + "') ", true); this.logError(ex); } }
/// <summary> /// Handles the Click event of the btnUpdateEquipo control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnUpdateEquipo_Click(Object sender, EventArgs e) { StringBuilder initJS = new StringBuilder(); wsFiatube.PantallaOT resultado = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { /*Se obtiene la informacion del equipo de trabajo*/ client = new WebService_FIATubeSoapClient(); /*Si la local es diferente a ajusco se obtien los empleados de la local correspondiente*/ if (int.Parse(HiddcboLocales.Value) != 36) { resultado = client.ObtieneDatosEquiporlocal(int.Parse(HiddcboLocales.Value)); } else { resultado = client.ObtieneDatosPantallaOT(Convert.ToInt32(Session["numUsuario"]), true, true); } /*se generan los arrays con la informacion de reporteros, camarografos y editores*/ if (resultado != null) { if (resultado.listaReporteros != null) { initJS.Append(getJSArrayDeclaration("arrReporteros", resultado.listaReporteros)); } if (resultado.listaCamarografos != null) { initJS.Append(getJSArrayDeclaration("arrCamarografos", resultado.listaCamarografos)); } if (resultado.listaEditores != null) { initJS.Append(getJSArrayDeclaration("arrEditores", resultado.listaEditores)); } } initJS.Append(" updateEquiposLocal(); "); ScriptManager.RegisterStartupScript(this, this.GetType(), "js", initJS.ToString(), true); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", " alertModal('Ocurrio un problema al obtener el equipo de trabajo de la local: " + ex.Message + "');", true); this.logError(ex); } }
/// <summary> /// Handles the Click event of the btnUpdateEquipo control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private string updateEquipo() { StringBuilder result = new StringBuilder(); StringBuilder initJS = new StringBuilder(); wsFiatube.PantallaOT resultado = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { /*Se obtiene la informacion del equipo de trabajo*/ client = new WebService_FIATubeSoapClient(); /*Si la local es diferente a ajusco se obtien los empleados de la local correspondiente*/ if (int.Parse(hiddLocalCv.Value) != 36) { resultado = client.ObtieneDatosEquiporlocal(int.Parse(hiddLocalCv.Value)); } else { resultado = client.ObtieneDatosPantallaOT(Convert.ToInt32(Session["numUsuario"]), true, true); } initJS.Append("<option value='0'>== SELECCIONE ==</option>"); /*se generan los arrays con la informacion de reporteros, camarografos y editores*/ if (resultado != null) { if (resultado.listaReporteros != null) { foreach (wsFiatube.TDI_EMPL item in resultado.listaReporteros) { initJS.Append("<option value='").Append(item.EmpleadoLlavePrimaria).Append("'>").Append(item.EmpleadoNombre).Append("</option>"); } } } result.Append(" $('#divGridAgenda').css('height', screen.height - 262); $('#cmbReportero').empty(); $('#cmbReportero').append(\"").Append(initJS.ToString()).Append("\"); setRating(); "); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", " alertModal('Ocurrio un problema al obtener el equipo de trabajo de la local: " + ex.Message + "');", true); this.logError(ex); } return(result.ToString()); }
public void btnActualizar_Click(Object sender, EventArgs e) { wsFiatube.THE_SolMatLocal[] result = null; wsFiatube.WebService_FIATubeSoapClient client; try { client = new wsFiatube.WebService_FIATubeSoapClient(); /*Se obtiene la informacion a pintar*/ result = client.TransferInterlocales(); this.updateScxreenData(result); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('" + ex.Message + "');", true); this.logError(ex); } }
/// <summary> /// Loads the data rep. /// </summary> private void loadDataRep() { wsFiatube.TDI_EMPL[] reporteros = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { client = new wsFiatube.WebService_FIATubeSoapClient(); reporteros = client.GetReporterosList(); if (reporteros != null) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", this.getJSArrayDeclaration("arrReporteros", reporteros), true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "Ocurrió un problema al obtener la información de los reporteros.", true); this.logError(ex); } }
public static string createNewOT(String data, wsFiatube.THE_LogTransacciones trans) { wsFiatube.AvanceMonitoreo obj; StringBuilder result = new StringBuilder(); wsFiatube.RegresoOrdenTrabajoIpad resp = null; obj = JsonConvert.DeserializeObject <wsFiatube.AvanceMonitoreo>(new Azteca.Utility.Security.Rijndael().Transmute(data, Azteca.Utility.Security.enmTransformType.intDecrypt)); wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); resp = client.CreaOTFromMonitoreo(obj, trans); if (resp != null && resp.oOrdenTrabajo.ClaveOrdenTrabajo != null && !resp.oOrdenTrabajo.ClaveOrdenTrabajo.Trim().Equals(string.Empty)) { result.Append("La OT ").Append(resp.oOrdenTrabajo.ClaveOrdenTrabajo).Append(" fue creada correctamente."); } return(result.ToString()); }
/// <summary> /// Handles the Click event of the btnCargaInfoAcoplado control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnCargaInfoAcoplado_Click(Object sender, EventArgs e) { string listadeVdoIdFilename = string.Empty; wsFiatube.FastResultset arrInfAcoplados = null; recuperaVideo.AcopladoIpad infoAcoplado = null; recuperaVideo.ImagenXAcopladoIpad[] resultado = null; wsFiatube.WebService_FIATubeSoapClient clientFiatube = null; recuperaVideo.WebService_RecuperaVideoSoapClient client = null; try { client = new WebService_RecuperaVideoSoapClient(); clientFiatube = new wsFiatube.WebService_FIATubeSoapClient(); infoAcoplado = (recuperaVideo.AcopladoIpad)Newtonsoft.Json.JsonConvert.DeserializeObject(hiddAcopS.Value, typeof(AcopladoIpad)); /*Se obtienen los registros relacionados con el acoplado*/ resultado = client.getListaImagenesXAcoplado(infoAcoplado); /*Se genera el nuevo Tab con la informacion correspondiente*/ if (resultado != null && resultado.Length > 0) { foreach (recuperaVideo.ImagenXAcopladoIpad itemConcat in resultado) { listadeVdoIdFilename += itemConcat.VdoIdFilename + "|"; } listadeVdoIdFilename = listadeVdoIdFilename.Substring(0, listadeVdoIdFilename.Length - 1); /*Se obtiene el resultado de la busqueda para los acoplados y se manda a crear el tab*/ arrInfAcoplados = clientFiatube.ObtenerBusquedaAvanzadaConSinOTFast("", infoAcoplado.Nombre, "", "0", "0", "0", "0", "0", DateTime.Now.ToString("yyyy-MM-dd"), DateTime.Now.ToString("yyyy-MM-dd"), "false", "true", "true", "true", "", "474", "", "", "0", "0", ValidaBusquedaVideosBaneados().ToString(), "100000000", "0", string.Empty, "string", Session["UserName"].ToString(), "false", /*Session["FinalCut"].ToString()*/ "", "true", "true", "true", "false", string.Empty); creaNuevoTabInfoAcoplado(arrInfAcoplados, infoAcoplado.Nombre); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('El Acoplado no tiene videos relacionados.');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('" + ex.Message + "');", true); this.logError(ex); } }
public static string getEqTrabajo(int eventId) { StringBuilder content = new StringBuilder(); wsFiatube.THE_EquipoTrabajo_EVDTIPad[] result = null; wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); result = client.ObtenerEquipoTrabajo_EVDT(eventId); if (result != null) { foreach (wsFiatube.THE_EquipoTrabajo_EVDTIPad equipo in result) { content.Append("<div>"); content.Append("<div><label>").Append(equipo.IdEmpleado).Append("</label></div>"); content.Append("<div><label>").Append(equipo.snombreEmpleado).Append("<label/></div>"); content.Append("</div>"); } } return(content.ToString()); }
/// <summary> /// Handles the Click event of the btnActualizar control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void btnActualizar_Click(Object sender, EventArgs e) { DateTime theDate; wsFiatube.AvanceMonitoreo[] result = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { /*Se valida que la fecha recibida sea una fecha valida*/ if (hiddDate.Value != null && !hiddDate.Value.Trim().Equals(String.Empty)) { try { theDate = Convert.ToDateTime(hiddDate.Value); } catch (Exception) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('Debe seleccionar una fecha válida.') ", true); return; } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('Debe seleccionar una fecha válida.') ", true); return; } /*Se realiza la consulta de informacion*/ client = new wsFiatube.WebService_FIATubeSoapClient(); result = client.GetAvancesMonitoreo(int.Parse(hiddFabr.Value), theDate); /*Se manda a cargar la informacion en pantalla*/ createHtmlData(result); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", " alertModal ('" + "Ocurrio un problema al realizar la consulta: " + ex.Message + "') ", true); this.logError(ex); } }
public static string getSeniales(int eventId, int cveProg, string date) { wsFiatube.THE_OrdenTrabajoIpad[] result = null; StringBuilder content = new StringBuilder(); wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); result = client.ObtenerOTs_EVDT(eventId, cveProg, date); if (result != null) { foreach (wsFiatube.THE_OrdenTrabajoIpad ot in result) { //content.Append("<div>"); //content.Append("<div><label>").Append(ot.).Append("</label></div>"); //content.Append("<div><label>").Append(ot.IdEmpleado).Append("</label></div>"); //content.Append("<div><label>").Append(ot.snombreEmpleado).Append("<label/></div>"); //content.Append("</div>"); } } return(content.ToString()); }
public static string getSolicitudes(int eventId) { StringBuilder content = new StringBuilder(); wsFiatube.THE_SolicitudFormatoIpad[] result = null; wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); result = client.ObtenerSolicitud_EVDT(eventId); if (result != null) { foreach (wsFiatube.THE_SolicitudFormatoIpad sol in result) { content.Append("<div>"); content.Append(@"<div onMouseOver=""this.style.cursor='pointer'"" onclick='openAutSol(").Append(sol.CveSolicitud.CveSolicitud).Append(")'>").Append(sol.CveSolicitud.CveSolicitud).Append("</div>"); content.Append("<div><label>").Append(sol.CveSolicitud.Titulo).Append("</label></div>"); content.Append("<div><label>").Append(sol.CvePrograma.NombrePrograma).Append("<label/></div>"); content.Append("<div><label>").Append(sol.CveSolicitud.FechaSolicitud.ToString("dd/MM/yyyy")).Append("</label></div>"); content.Append("</div>"); } } return(content.ToString()); }
private void loadEmployeeData() { String array = string.Empty; wsFiatube.ArrayOfString[] resultado = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { client = new wsFiatube.WebService_FIATubeSoapClient(); resultado = client.ObtenerEmpleados(); if (resultado != null && resultado.Length > 0) { array = getJSArrayDeclaration("arrEmpl", resultado); ScriptManager.RegisterStartupScript(this, this.GetType(), "js", array, true); } } catch (Exception ex) { this.showErrorMessage("Ocurrió un problema al obtener la información de los empleados: " + ex.Message); this.logError(ex); } }
/// <summary> /// Buscars the evaluacion. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void buscarEvaluacion_click(object sender, EventArgs e) { int local = 0, programa = 0; DateTime fecha = default(DateTime); wsFiatube.THE_Evaluacion[] evaluadas = null; wsFiatube.THE_Evaluacion[] transmitidas = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { /*Se valida la informacion de entrada*/ try { local = int.Parse(hdfLocl.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('* Es necesario seleccionar una Local.<BR />')", true); } try { programa = int.Parse(hdfPrgm.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('* Es necesario seleccionar un Programa.<BR />')", true); } try { fecha = Convert.ToDateTime(hdfDate.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('* Debe seleccionar una fecha válida.<BR />')", true); } /*Se obtienen los datos correspondientes*/ client = new wsFiatube.WebService_FIATubeSoapClient(); transmitidas = client.getNotasPorEvaluar(programa, fecha); //transmitidas = client.ObtenerOtsTransmitidas(programa.ToString(), fecha.ToString("dd/MM/yyyy")); evaluadas = client.obtenerNotasEvaluadas(programa, fecha); //evaluadas = client.ObtenerOtsEvaluadas(programa.ToString(), fecha.ToString("dd/MM/yyyy")); /*Se pinta actualiza la pantalla con los nuevos datos*/ creaTablaTransmitidas(transmitidas); creaTablaEvaluadas(evaluadas); ScriptManager.RegisterStartupScript(this, this.GetType(), "js", " cargaCombos(); ", true); } catch (Exception ex) { this.logError(ex); ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Ocurrio un problema al actualizar la pantalla: '" + ex.Message + ")", true); } }
/// <summary> /// Handles the Click event of the btnActualizar control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void btnActualizar_Click(object sender, EventArgs e) { DateTime temp; wsFiatube.THE_EventoDeportivoIpad[] result = null; wsFiatube.WebService_FIATubeSoapClient client = null; try { temp = Convert.ToDateTime(hiddDate.Value); client = new wsFiatube.WebService_FIATubeSoapClient(); /*Se obtienen los datos a cargar en pantalla*/ result = client.ObtenerDatosMes(temp.Month.ToString(), temp.Year.ToString()); /*Se genera el codigo html a mostrar en pantalla*/ updateScreenData(result, temp); lblMesActual.InnerText = temp.ToString("MMMM DE yyyy").ToUpper(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Ocurrio un problema al actualizar la información.');", true); this.logError(ex); } }
public void btnActualizar_Click(Object sender, EventArgs e) { Int32 cvePrograma; DateTime fechaCreacion; wsFiatube.WebService_FIATubeSoapClient client = null; wsFiatube.THE_OrdenTrabajoIpad[] resultado = null; wsFiatube.ArrayOfString ListaTipoDato = new wsFiatube.ArrayOfString(); Dictionary <string, string> NumTotalDatos = new Dictionary <string, string>(); try { /*Se guarda la informacion*/ try { fechaCreacion = Convert.ToDateTime(hiddFec.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Debe especificar una fecha válida.');", true); return; } if (fechaCreacion.CompareTo(DateTime.Now.Date) < 0) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('La fecha de transmisión no puede ser menor a la fecha actual.');", true); return; } try { cvePrograma = Convert.ToInt32(hiddPrg.Value); } catch (Exception) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Debe especificar un programa válido.');", true); return; } if (txtTeasers.Text.Trim() != "" && txtTeasers.Text.Trim() != "0") { NumTotalDatos.Add("TEASER ", txtTeasers.Text.Trim()); ListaTipoDato.Add("TEASER "); } if (txtBumpers.Text.Trim() != "0" && txtBumpers.Text.Trim() != "") { NumTotalDatos.Add("BUMPER ", txtBumpers.Text.Trim()); ListaTipoDato.Add("BUMPER "); } if (txtPistas.Text.Trim() != "0" && txtPistas.Text.Trim() != "") { NumTotalDatos.Add("PISTA ", txtPistas.Text.Trim()); ListaTipoDato.Add("PISTA "); } if (txtEnlaceH.Text.Trim() != "0" && txtEnlaceH.Text.Trim() != "") { NumTotalDatos.Add("ENLACE HELICOPTERO ", txtEnlaceH.Text.Trim()); ListaTipoDato.Add("ENLACE HELICOPTERO "); } if (txtPromos.Text.Trim() != "0" && txtPromos.Text.Trim() != "") { NumTotalDatos.Add("PROMO ", txtPromos.Text.Trim()); ListaTipoDato.Add("PROMO "); } if (txtCortinillas.Text.Trim() != "0" && txtCortinillas.Text.Trim() != "") { NumTotalDatos.Add("CORTINILLA ", txtCortinillas.Text.Trim()); ListaTipoDato.Add("CORTINILLA "); } if (txtRompecortes.Text.Trim() != "0" && txtRompecortes.Text.Trim() != "") { NumTotalDatos.Add("ROMPECORTE ", txtRompecortes.Text.Trim()); ListaTipoDato.Add("ROMPECORTE "); } if (txtFotoportada.Text.Trim() != "0" && txtFotoportada.Text.Trim() != "") { NumTotalDatos.Add("FOTOPORTADA ", txtFotoportada.Text.Trim()); ListaTipoDato.Add("FOTOPORTADA "); } if (txtEnlaceMoto.Text.Trim() != "0" && txtEnlaceMoto.Text.Trim() != "") { NumTotalDatos.Add("ENLACE MOTO ", txtEnlaceMoto.Text.Trim()); ListaTipoDato.Add("ENLACE MOTO "); } if (txtEnlaceHT.Text.Trim() != "0" && txtEnlaceHT.Text.Trim() != "") { NumTotalDatos.Add("ENLACE HELICOPTERO-TRUCO ", txtEnlaceHT.Text.Trim()); ListaTipoDato.Add("ENLACE HELICOPTERO-TRUCO "); } if (txtEnlaceMotoT.Text.Trim() != "0" && txtEnlaceMotoT.Text.Trim() != "") { NumTotalDatos.Add("ENLACE MOTO-TRUCO ", txtEnlaceMotoT.Text.Trim()); ListaTipoDato.Add("ENLACE MOTO-TRUCO "); } if (NumTotalDatos.Count == 0) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('Debe especificar al menos un tipo de OT a generar.');", true); return; } wsFiatube.ArrayOfString[] numTotDatos = new wsFiatube.ArrayOfString[NumTotalDatos.Count]; int contador = 0; wsFiatube.ArrayOfString aux; foreach (string clave in NumTotalDatos.Keys) { aux = new wsFiatube.ArrayOfString(); aux.Add(clave); aux.Add(NumTotalDatos[clave]); numTotDatos[contador] = aux; contador++; } /*Se crea la coleccion de parametros a enviar*/ wsFiatube.ArrayOfString[] initParams = new wsFiatube.ArrayOfString[5]; for (int i = 0; i < 5; i++) { initParams[i] = new wsFiatube.ArrayOfString(); } initParams[0].Add("NumUsuario"); initParams[0].Add(Session["numUsuario"].ToString()); initParams[1].Add("UserName"); initParams[1].Add(Session["UserName"].ToString()); initParams[2].Add("UserIP"); initParams[2].Add(Session["userIP"].ToString()); initParams[3].Add("UserDomain"); initParams[3].Add(Session["userDomain"].ToString()); initParams[4].Add("UserMachineName"); initParams[4].Add(Session["userMachineName"].ToString()); client = new wsFiatube.WebService_FIATubeSoapClient(); resultado = client.GuardaOTTeaserYBumper(initParams, numTotDatos, ListaTipoDato, cvePrograma.ToString(), fechaCreacion); /*Se actualiza la tabla de resultados*/ updateScreenData(resultado); ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "resetForm();", true); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "js", "alertModal('" + ex.Message + "');", true); this.logError(ex); } }
public static string saveRequestDiva(string nameOfJob, ArrayOfString files, ArrayOfString timecodes, bool value, int prioridad, string usnu, string usnam, VideoRecuperacion objPetVidRec, List <VideoRecuperacionArchivo> lstPetVidRecAr, bool isNot, THE_LogTransacciones trans, bool isUsrGnt, bool isUsrGntAd, bool isComplete, int idLocalDest, string mapPath) { String result = null; VideoRecuperacion otroRes = null; try{ objPetVidRec.GuidSystem = Guid.NewGuid().ToString(); objPetVidRec.FechaVideoRecuperacion = DateTime.Now; objPetVidRec.CveLocal = new TDI_Local { LocalLlave = idLocalDest }; recuperaVideo.WebService_RecuperaVideoSoapClient client = new WebService_RecuperaVideoSoapClient(); otroRes = client.InsertarVideoRecuperacionyArchivos(objPetVidRec, lstPetVidRecAr.ToArray(), isNot, trans, isUsrGnt, isUsrGntAd); if (objPetVidRec.CveLocal.LocalLlave != 36) { wsFiatube.WebService_FIATubeSoapClient clientFiatube = new wsFiatube.WebService_FIATubeSoapClient(); FIATubeHtml5.wsFiatube.THE_SolMatLocal material = new FIATubeHtml5.wsFiatube.THE_SolMatLocal(); FIATubeHtml5.wsFiatube.TDI_EMPL oempl = new FIATubeHtml5.wsFiatube.TDI_EMPL(); oempl.EmpleadoUsr = objPetVidRec.CveEmpleado.EmpleadoUsr; oempl.EmpleadoLlavePrimaria = objPetVidRec.CveEmpleado.EmpleadoLlavePrimaria; FIATubeHtml5.wsFiatube.TDI_StatusMatLocal status = new FIATubeHtml5.wsFiatube.TDI_StatusMatLocal(); status.CveStatusMatLocal = 17; status.Nombre = "restaurando"; status.NombreAbrev = "rtd"; status.Obs = "17"; FIATubeHtml5.wsFiatube.TDI_Local localdestino = new FIATubeHtml5.wsFiatube.TDI_Local(); FIATubeHtml5.wsFiatube.TDI_LocalEmpleado empllocal = new wsFiatube.TDI_LocalEmpleado { Local = new FIATubeHtml5.wsFiatube.TDI_Local { LocalLlave = objPetVidRec.CveLocal.LocalLlave } }; localdestino = empllocal.Local; FIATubeHtml5.wsFiatube.TDI_PriorMatLocal prioridadRestauracion = new FIATubeHtml5.wsFiatube.TDI_PriorMatLocal(); prioridadRestauracion.CvePriorMatLocal = 2; prioridadRestauracion.Descripcion = "normal"; prioridadRestauracion.Abreviatura = "nm"; material.CheckDestino = "0"; material.CheckOrigen = "0"; material.CveDestino = localdestino; material.CveEmpleado = oempl; material.CveEstatus = status; material.PorcentajeEnvio = 0; material.Nombre = otroRes.NombreVideoRecuperacion; material.CveOrigen = new FIATubeHtml5.wsFiatube.TDI_Local { LocalLlave = 36 }; material.CvePrioridad = prioridadRestauracion; material.CveVideoRecuperacion = new wsFiatube.VideoRecuperacion { CveVideoRecuperacion = otroRes.CveVideoRecuperacion }; material.Ruta = @"\\10.71.244.14\AztecaTube-Locales\Restore\"; material.TipoMaterialenLocal = new FIATubeHtml5.wsFiatube.TDI_TipoMatLocal() { TatlLlave = 1 }; material.FechaSolicitud = DateTime.Now.ToString("dd/MM/yyyy"); material.PorcentajeEnvio = 0; clientFiatube.GuardarSolMatLocal(material); } if (otroRes != null && otroRes.CveVideoRecuperacion > 0) { if (isComplete) { result = "Se guardo correctamente la solicitud de recuperación. No hay Recuperaciones Previas a su Solicitud"; } else { result = "Se guardo correctamente la solicitud de recuperación."; //No hay Recuperaciones Previas a su Solicitud"; } } else { result = "No se pudo guardar correctamente la solicitud de recuperación"; } } catch (Exception ex) { result = "No se pudo guardar correctamente la solicitud de recuperación"; } return(result); }
public static void deleteEvaluation(wsFiatube.THE_ReaiIpad toUpd) { wsFiatube.WebService_FIATubeSoapClient client = new wsFiatube.WebService_FIATubeSoapClient(); client.ActualizarStatusReaiEliminar(toUpd); }