public async Task <IActionResult> ObtenerListaXTipo([FromQuery(Name = "listaId")] int listaId) { TipoLista tipoLista = (TipoLista)listaId; var lista = await _repo.ObtenerListaXTipo(tipoLista); return(Ok(lista)); }
public void ActualizarVistaTabla(ref VistaLista listView, TipoLista index) {/* * listView.Items.Clear(); * foreach(MProyecto mProyecto in MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)index]) * { * ListViewItem listViewItem = new ListViewItem(mProyecto.getMTFG.Titulo); * listViewItem.SubItems.Add(mProyecto.getMTFG.Descripcion); * listViewItem.SubItems.Add(mProyecto.getMTFG.Fecha); * if (mProyecto.Asignado) * { * listViewItem.SubItems.Add(mProyecto.Alumno.Nombre); * listViewItem.SubItems.Add(mProyecto.Alumno.PrimerApellido); * listViewItem.SubItems.Add(mProyecto.Alumno.SegundoApellido); * listViewItem.SubItems.Add(mProyecto.Alumno.Matricula); * listViewItem.SubItems.Add(mProyecto.Alumno.FechaInicio); * if (mProyecto.getMTFG.Finalizado) * { * listViewItem.SubItems.Add(mProyecto.getMTFG.getMFinalizado.Defensa); * listViewItem.SubItems.Add(mProyecto.getMTFG.getMFinalizado.Convocatoria); * listViewItem.SubItems.Add(mProyecto.getMTFG.getMFinalizado.Nota.ToString()); * } * } * listView.Items.Add(listViewItem); * }*/ listView.VirtualListSize = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)index].Count; }
public async Task <IActionResult> ObtenerListaXTipoyPci([FromQuery(Name = "listaId")] int listaId) { valorPciId = User.FindFirst(ClaimTypes.Role).Value; if (!string.IsNullOrEmpty(valorPciId)) { pciId = int.Parse(valorPciId); } TipoLista tipoLista = (TipoLista)listaId; var lista = await _repo.ObtenerListaXTipoyPci(pciId, tipoLista); return(Ok(lista)); }
private bool _validacionTipoLista(List <TipoLista> _listaArchivo) { //Lista de archivos List <TipoLista> _TipoListaDistinctArchivo = new List <TipoLista>(); var d = _listaArchivo.Select(o => o.strTipoLista).Distinct(); foreach (var item in d) { TipoLista _tl = new TipoLista(); _tl.strTipoLista = item; _TipoListaDistinctArchivo.Add(_tl); } //Lista BD List <TipoLista> _tipoListaBD = new List <TipoLista>(); _tipoListaBD.AddRange(rsListaNegra.ListarTipoListaPLD()); List <TipoLista> _lsF = new List <TipoLista>(); //Diferencia foreach (TipoLista item in _TipoListaDistinctArchivo) { bool existe = false; TipoLista _data = new TipoLista(); _data = item; foreach (TipoLista _item in _tipoListaBD) { if (_data.strTipoLista.ToUpper() == _item.strTipoLista.ToUpper()) { existe = true; } } if (existe == false) { _lsF.Add(_data); } } //No exite diferencia if (_lsF.Count == 0) { return(true); } //Existe diferencia gvdTipoLista.DataSource = _lsF; gvdTipoLista.DataBind(); mpeAgregarTipoLista.Show(); return(false); }
public void toolStripMenuItem1_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { string proyecto = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Titulo + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Descripcion + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Fecha; if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Asignado) { proyecto += ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.Nombre + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.PrimerApellido + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.SegundoApellido + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.Matricula + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.FechaInicio; if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Finalizado) { proyecto += ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Defensa + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Convocatoria + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Nota; } } Clipboard.SetText(proyecto); }
public void copiarConFormato_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { string proyecto = "Título: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Titulo + "\r\nDescripción: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Descripcion + "\r\nRegistrado el: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Fecha + "\r\nNombre del profesor: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Nombre + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.PrimerApellido + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.SegundoApellido + "\r\nDespacho: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Despacho + "\r\nCorreo electrónico: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Correo; if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Asignado) { proyecto += "\r\nNombre del alumno" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.Nombre + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.PrimerApellido + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.SegundoApellido + "\r\nMatrícula: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.Matricula + "\r\nFecha de inicio" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.FechaInicio; if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Finalizado) { proyecto += "\r\nFecha de la defensa: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Defensa + "\r\nConvocatoria: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Convocatoria + "\r\nCalificación: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Nota; } } Clipboard.SetText(proyecto); }
public string ActualizarDatosRichTextBox(int indice, TipoLista indiceLista, TDatos mostrar) { string texto = null; switch (mostrar) { case TDatos.Profesor: texto = "Información sobre el Profesor:\r\nNombre: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Profesor.Nombre + "\r\nPrimer apellido: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Profesor.PrimerApellido + "\r\nSegundo apellido: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Profesor.SegundoApellido + "\r\nCorreo electrónico: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Profesor.Correo + "\r\nDespacho: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Profesor.Despacho; break; case TDatos.TFG: texto = "Información sobre el TFG:\r\nTítulo: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].getMTFG.Titulo + "\r\nDescripción: " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].getMTFG.Descripcion + "\r\nAsignado a: " + (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Asignado ? (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Alumno.Nombre + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Alumno.PrimerApellido + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].Alumno.SegundoApellido) : "Sin asignar") + "\r\nFinalizado: " + (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][indice].getMTFG.Finalizado ? "Sí" : "No"); break; } return(texto); }
public async void Config(TipoLista tipo, int idUsuario) { Tipo = tipo; IdUsuario = idUsuario; switch (tipo) { case TipoLista.Seguidos: Title = "Quem ele segue"; LOAD.INICIA("Trazendo quem o usuário segue..."); await Lista.BuscaSeguidos(IdUsuario); LOAD.FINALIZA(); break; case TipoLista.Seguidores: Title = "Quem segue ele"; LOAD.INICIA("Trazendo quem segue o usuário..."); await Lista.BuscaSeguidores(IdUsuario); LOAD.FINALIZA(); break; } }
public void CopiarDespachoProfesor(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Despacho); }
public void CopiarNombreCompletoAlumno(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.Nombre + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.PrimerApellido + " " + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.SegundoApellido); }
public void notaToolStripMenuItem_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.getMFinalizado.Nota.ToString()); }
public void copiarDatosDeProfesorToolStripMenuItem_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Nombre + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.PrimerApellido + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.SegundoApellido + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Despacho + ";" + MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Profesor.Correo); }
public void BotonModificar(ComboBox comboBox1, TextBox textBox8, ComboBox comboBox3, DateTimePicker dateTimePicker3, NumericUpDown numericUpDown1, ref VistaLista listView, TipoLista indiceLista) { string valor = ""; //int indice = listView.SelectedIndices[0]; int indice = MListaProyectos.getMListaProyectos.getMProyectos.getProyectos.IndexOf(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indiceLista][listView.SelectedIndices[0]]);//listView.SelectedIndices[0]; switch (comboBox1.SelectedIndex) { case 2: case 7: case 8: valor = dateTimePicker3.Text; break; case 9: valor = comboBox3.Text; break; case 10: valor = numericUpDown1.Value.ToString(); break; default: valor = textBox8.Text; break; } cProyectos.ModificarProyecto(comboBox1.SelectedIndex, valor, indice); listView.RedrawItems(listView.SelectedIndices[0], listView.SelectedIndices[0], false); //ActualizarVistaTabla(ref listView, indiceLista); //listView.Items[indice].Selected = true; }
public void matrículaToolStripMenuItem_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.Matricula); }
public void fechaDeRegistroToolStripMenuItem_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Fecha.Date.ToShortDateString()); }
public async Task <ICollection <ValorSeleccion> > ObtenerListaXTipo(TipoLista tipo) { List <ValorSeleccion> lista = new List <ValorSeleccion>(); switch (tipo) { case TipoLista.ModalidadContrato: { lista = await(from m in _context.TipoModalidadContrato select new ValorSeleccion() { Id = m.TipoModalidadContratoId, Codigo = m.Codigo, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.TipoCuentaXPagar: { lista = await(from m in _context.TipoCuentaXPagar select new ValorSeleccion() { Id = m.TipoCuentaXPagarId, Codigo = m.Codigo, Nombre = m.Nombre, }) .OrderBy(m => m.Nombre) .ToListAsync(); break; } case TipoLista.TipoIva: { lista = await(from m in _context.TipoIva select new ValorSeleccion() { Id = m.TipoIvaId, Codigo = m.Codigo, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.TipoPago: { lista = await(from m in _context.TipoDePago select new ValorSeleccion() { Id = m.TipoDePagoId, Codigo = m.Codigo, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.TipoDocumentoSoporte: { lista = await(from m in _context.TipoDocumentoSoporte select new ValorSeleccion() { Id = m.TipoDocumentoSoporteId, Codigo = m.Codigo, Nombre = m.Nombre, }) .OrderBy(m => m.Nombre) .ToListAsync(); break; } case TipoLista.TipoAdminPila: { lista = await(from m in _context.TipoAdminPila select new ValorSeleccion() { Id = Int32.Parse(m.Codigo), Codigo = m.Codigo, Nombre = m.Nombre, }) .OrderBy(m => m.Nombre) .ToListAsync(); break; } case TipoLista.TipoDocumentoIdentidad: { lista = await(from m in _context.TipoDocumentoIdentidad select new ValorSeleccion() { Id = m.TipoDocumentoIdentidadId, Codigo = m.Codigo, Nombre = m.Nombre, }) .OrderBy(m => m.Nombre) .ToListAsync(); break; } case TipoLista.TipoContrato: { lista = await(from m in _context.TipoContrato select new ValorSeleccion() { Id = m.TipoContratoId, Codigo = m.Codigo, Nombre = m.Nombre, }) .OrderBy(m => m.Nombre) .ToListAsync(); break; } case TipoLista.Pci: { lista = await(from m in _context.Pci select new ValorSeleccion() { Id = m.PciId, Codigo = m.Identificacion, Nombre = m.Identificacion + " " + m.Nombre, }) .OrderBy(m => m.Nombre) .ToListAsync(); break; } case TipoLista.FuenteFinanciacion: { lista = await(from m in _context.FuenteFinanciacion select new ValorSeleccion() { Id = m.FuenteFinanciacionId, Codigo = m.Codigo, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.SituacionFondo: { lista = await(from m in _context.SituacionFondo select new ValorSeleccion() { Id = m.SituacionFondoId, Codigo = m.Codigo, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.RecursoPresupuestal: { lista = await(from m in _context.RecursoPresupuestal select new ValorSeleccion() { Id = m.RecursoPresupuestalId, Codigo = m.Codigo, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.MedioPago: { lista = ListaMedioPago(); break; } default: break; } return(lista); }
private int LeeArchivo(string Archivo) { int result = 0; try { StreamReader objReader = new StreamReader(fupArchivo.FileContent, System.Text.Encoding.GetEncoding(1252), false); string [] strEntities; string sLine = ""; List <ListaNegraService.ListaNegra> lstListaNegra = new List <ListaNegraService.ListaNegra>(); int count = 0; sLine = objReader.ReadLine(); if (identificaColumnas(sLine) == 1) { while (sLine != null) { if (sLine != null) { if (count != 0) { sLine = sLine.Replace("|", ""); ListaNegraService.ListaNegra listaNegra = new ListaNegraService.ListaNegra(); strEntities = sLine.Split(new char[] { '\t' }); if (strEntities[entity[0]] != "" && strEntities[entity[20]] != "" && strEntities[entity[7]] != "") { listaNegra.VCHTIPOLISTA = strEntities[entity[0]]; listaNegra.VCHIDQEQ = strEntities[entity[0]] + '|'; listaNegra.VCHNOMBRE = entity[1] != -1 ? QuitarCaracteresEspeciales(strEntities[entity[1]]).ToUpper() + '|' : "" + '|'; listaNegra.VCHAPPATERNO = entity[2] != -1 ? QuitarCaracteresEspeciales(strEntities[entity[2]]).ToUpper() + '|' : "" + '|'; listaNegra.VCHAPMATERNO = entity[3] != -1 ? QuitarCaracteresEspeciales(strEntities[entity[3]]).ToUpper() + '|' : "" + '|'; listaNegra.iProveedorId = ddlProveedores.SelectedValue; if (entity[4] != -1) { listaNegra.VCHCURP = strEntities[entity[4]] + '|'; } else { listaNegra.VCHCURP = "" + '|'; } if (entity[5] != -1) { listaNegra.VCHRFC = strEntities[entity[5]] + '|'; } else { listaNegra.VCHRFC = "" + '|'; } if (entity[6] != -1) { listaNegra.VCHFECHANAC = strEntities[entity[6]] + '|'; } else { listaNegra.VCHFECHANAC = "" + '|'; } if (entity[7] != -1) { listaNegra.VCHTIPOLISTA = strEntities[entity[7]] + '|'; } else { listaNegra.VCHTIPOLISTA = "" + '|'; } if (entity[8] != -1) { listaNegra.VCHESTATUS = strEntities[entity[8]] + '|'; } else { listaNegra.VCHESTATUS = "" + '|'; } if (entity[9] != -1) { listaNegra.VCHDEPENDENCIA = strEntities[entity[9]] + '|'; } else { listaNegra.VCHDEPENDENCIA = "" + '|'; } if (entity[10] != -1) { listaNegra.VCHPUESTO = strEntities[entity[10]] + '|'; } else { listaNegra.VCHPUESTO = "" + '|'; } if (entity[11] != -1) { listaNegra.INTIDDISPO = strEntities[entity[11]] + '|'; } else { listaNegra.INTIDDISPO = "" + '|'; } if (entity[12] != -1) { listaNegra.BITCURPOK = strEntities[entity[12]] + '|'; } else { listaNegra.BITCURPOK = "" + '|'; } if (entity[13] != -1) { listaNegra.VCHIDREL = strEntities[entity[13]] + '|'; } else { listaNegra.VCHIDREL = "" + '|'; } if (entity[14] != -1) { listaNegra.VCHPARENTESCO = strEntities[entity[14]] + '|'; } else { listaNegra.VCHPARENTESCO = "" + '|'; } if (entity[15] != -1) { listaNegra.VCHRAZONSOCIAL = strEntities[entity[15]] + '|'; } else { listaNegra.VCHRAZONSOCIAL = "" + '|'; } if (entity[16] != -1) { listaNegra.VCHRFCMORAL = strEntities[entity[16]] + '|'; } else { listaNegra.VCHRFCMORAL = "" + '|'; } if (entity[17] != -1) { listaNegra.VCHISSSTE = strEntities[entity[17]] + '|'; } else { listaNegra.VCHISSSTE = "" + '|'; } if (entity[18] != -1) { listaNegra.VCHIMSS = strEntities[entity[18]] + '|'; } else { listaNegra.VCHIMSS = "" + '|'; } if (entity[19] != -1) { listaNegra.VCHINGRESOS = strEntities[entity[19]] + '|'; } else { listaNegra.VCHINGRESOS = "" + '|'; } if (entity[20] != -1) { listaNegra.VCHNOMCOMPLETO = QuitarCaracteresEspeciales(strEntities[entity[20]]).ToUpper() + '|'; } else { listaNegra.VCHNOMCOMPLETO = "" + '|'; } if (entity[21] != -1) { listaNegra.VCHAPELLIDOS = QuitarCaracteresEspeciales(strEntities[entity[21]]).ToUpper() + '|'; } else { listaNegra.VCHAPELLIDOS = "" + '|'; } if (listaNegra.VCHNOMBRE.Replace("|", "") != string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") != string.Empty && listaNegra.VCHAPMATERNO.Replace("|", "") != string.Empty) { listaNegra.vchCadenaNPM = listaNegra.VCHNOMBRE.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPPATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPMATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); listaNegra.vchCadenaNMP = listaNegra.VCHNOMBRE.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPMATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPPATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } if (listaNegra.VCHNOMBRE.Replace("|", "") != string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") == string.Empty || listaNegra.VCHAPMATERNO.Replace("|", "") == string.Empty && (listaNegra.VCHAPPATERNO.Replace("|", "") != string.Empty || listaNegra.VCHAPMATERNO.Replace("|", "") != string.Empty)) { listaNegra.vchCadenaNPM = listaNegra.VCHNOMBRE.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPPATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPMATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } if (listaNegra.VCHNOMBRE.Replace("|", "") == string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") == string.Empty && listaNegra.VCHAPMATERNO.Replace("|", "") == string.Empty) { if (listaNegra.VCHNOMCOMPLETO.Replace("|", "") == listaNegra.VCHRAZONSOCIAL.Replace("|", "")) { listaNegra.vchCadenaNPM = listaNegra.VCHNOMCOMPLETO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } } if (listaNegra.VCHNOMBRE.Replace("|", "") == string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") == string.Empty && listaNegra.VCHAPMATERNO.Replace("|", "") == string.Empty) { if (listaNegra.VCHNOMCOMPLETO.Replace("|", "") != listaNegra.VCHRAZONSOCIAL.Replace("|", "")) { listaNegra.vchCadenaNPM = listaNegra.VCHRAZONSOCIAL.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); listaNegra.vchCadenaNMP = listaNegra.VCHNOMCOMPLETO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } } try { if (entity[22] != -1) { listaNegra.VCHENTIDAD = strEntities[entity[22]] + '|'; } else { listaNegra.VCHENTIDAD = "" + '|'; } if (entity[23] != -1) { listaNegra.VCHGENERO = strEntities[entity[23]] + '|'; } else { listaNegra.VCHGENERO = "" + '|'; } } catch { listaNegra.VCHENTIDAD = "|"; listaNegra.VCHGENERO = "|"; } //Nueva relación de BD //Se agrega uno por identidad y uno por bitEstatus. La identidad se auto incrementa y el bitEstatus se asigna en True lstListaNegra.Add(listaNegra); sbtxt.AppendLine("1|" + listaNegra.VCHIDQEQ + listaNegra.VCHTIPOLISTA + listaNegra.VCHNOMBRE + listaNegra.VCHAPPATERNO + listaNegra.VCHAPMATERNO + listaNegra.VCHCURP + listaNegra.VCHRFC + listaNegra.VCHFECHANAC + listaNegra.VCHESTATUS + listaNegra.VCHDEPENDENCIA + listaNegra.VCHPUESTO + listaNegra.INTIDDISPO + listaNegra.BITCURPOK + listaNegra.VCHIDREL + listaNegra.VCHPARENTESCO + listaNegra.VCHRAZONSOCIAL + listaNegra.VCHRFCMORAL + listaNegra.VCHISSSTE + listaNegra.VCHIMSS + listaNegra.VCHINGRESOS + listaNegra.VCHNOMCOMPLETO + listaNegra.VCHAPELLIDOS + listaNegra.VCHENTIDAD + listaNegra.VCHGENERO + Session["User"] + "|" + DateTime.Now.ToString("yyyy/MM/dd") + "|" + listaNegra.vchCadenaNPM + "|" + listaNegra.vchCadenaNMP + "|" + listaNegra.iProveedorId + "|1"); } } count++; sLine = objReader.ReadLine(); } } objReader.Close(); //Persistencia de datos en archivo EscribeArchivo(sbtxt); foreach (ListaNegraService.ListaNegra item in lstListaNegra) { TipoLista _lista = new TipoLista(); _lista.strTipoLista = item.VCHTIPOLISTA.Substring(0, item.VCHTIPOLISTA.Length - 1); _listaNegraArchivo.Add(_lista); } result = 1; } //else //{ //} } catch (Exception ex) { escribeLog(ex.Message); throw ex; } return(result); }
public void copiarPorCampoToolStripMenuItem_DropDownOpening(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Asignado) { copiarPorCampoToolStripMenuItem.DropDownItems[3].Visible = true; copiarPorCampoToolStripMenuItem.DropDownItems[4].Visible = true; copiarPorCampoToolStripMenuItem.DropDownItems[5].Visible = true; copiarPorCampoToolStripMenuItem.DropDownItems[6].Visible = true; copiarPorCampoToolStripMenuItem.DropDownItems[7].Visible = true; if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Finalizado) { copiarPorCampoToolStripMenuItem.DropDownItems[8].Visible = true; copiarPorCampoToolStripMenuItem.DropDownItems[9].Visible = true; copiarPorCampoToolStripMenuItem.DropDownItems[10].Visible = true; } else { copiarPorCampoToolStripMenuItem.DropDownItems[8].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[9].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[10].Visible = false; } } else { copiarPorCampoToolStripMenuItem.DropDownItems[3].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[4].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[5].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[6].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[7].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[8].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[9].Visible = false; copiarPorCampoToolStripMenuItem.DropDownItems[10].Visible = false; } }
public SelectLista(int usuarioId, TipoLista tipoLista) { this.tipoLista = tipoLista; this.usuarioId = usuarioId; }
public Form12(int indice, TipoLista tLista) { copiar = new Copiar(); this.tLista = tLista; this.indice = indice; mProyecto = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)tLista][indice]; InitializeComponent(); titulo.Text = mProyecto.getMTFG.Titulo; descripcion.Text = mProyecto.getMTFG.Descripcion; registro.Text = mProyecto.getMTFG.Fecha.Date.ToShortDateString(); if (mProyecto.Asignado) { alumno_label.Visible = true; nombreCompletoAlumno.Visible = true; copiarAlumno.Visible = true; matricula_label.Visible = true; matriculaAlumno.Visible = true; copiarMatricula.Visible = true; fecha_inicio_label.Visible = true; fechaAlumno.Visible = true; copiarFechaInicio.Visible = true; nombreCompletoAlumno.Text = mProyecto.Alumno.Nombre + " " + mProyecto.Alumno.PrimerApellido + " " + mProyecto.Alumno.SegundoApellido; matriculaAlumno.Text = mProyecto.Alumno.Matricula; fechaAlumno.Text = mProyecto.Alumno.FechaInicio.Date.ToShortDateString(); if (mProyecto.getMTFG.Finalizado) { estado.Text = "Finalizado"; defensa_label.Visible = true; fechaDefensa.Visible = true; copiarDefensa.Visible = true; convocatoria_label.Visible = true; Convocatoria.Visible = true; copiarConvocatoria.Visible = true; calificacion_label.Visible = true; Calificacion.Visible = true; copiarNota.Visible = true; fechaDefensa.Text = mProyecto.getMTFG.getMFinalizado.Defensa.Date.ToShortDateString(); Convocatoria.Text = mProyecto.getMTFG.getMFinalizado.Convocatoria; Calificacion.Text = mProyecto.getMTFG.getMFinalizado.Nota.ToString(); } else { estado.Text = "Asignado"; defensa_label.Visible = false; fechaDefensa.Visible = false; copiarDefensa.Visible = false; convocatoria_label.Visible = false; Convocatoria.Visible = false; copiarConvocatoria.Visible = false; calificacion_label.Visible = false; Calificacion.Visible = false; copiarNota.Visible = false; } } else { estado.Text = "Sin asignar"; alumno_label.Visible = false; nombreCompletoAlumno.Visible = false; copiarAlumno.Visible = false; matricula_label.Visible = false; matriculaAlumno.Visible = false; copiarMatricula.Visible = false; fecha_inicio_label.Visible = false; fechaAlumno.Visible = false; copiarFechaInicio.Visible = false; defensa_label.Visible = false; fechaDefensa.Visible = false; copiarDefensa.Visible = false; convocatoria_label.Visible = false; Convocatoria.Visible = false; copiarConvocatoria.Visible = false; calificacion_label.Visible = false; Calificacion.Visible = false; copiarNota.Visible = false; } nombreCompletoProfesor.Text = mProyecto.Profesor.Nombre + " " + mProyecto.Profesor.PrimerApellido + " " + mProyecto.Profesor.SegundoApellido; correoProfesor.Text = mProyecto.Profesor.Correo; despachoProfesor.Text = mProyecto.Profesor.Despacho; }
public async Task <ICollection <ValorSeleccion> > ObtenerListaXTipoyPci(int pciId, TipoLista tipo) { List <ValorSeleccion> lista = new List <ValorSeleccion>(); switch (tipo) { case TipoLista.Dependencia: { lista = await(from m in _context.Dependencia where m.PciId == pciId select new ValorSeleccion() { Id = m.DependenciaId, Nombre = m.Nombre, }).ToListAsync(); break; } case TipoLista.Usuario: { lista = await(from m in _context.Usuario where m.PciId == pciId select new ValorSeleccion() { Id = m.UsuarioId, Nombre = m.Nombres + ' ' + m.Apellidos, }).ToListAsync(); break; } default: break; } return(lista); }
private bool _validacionTipoLista(List<TipoLista> _listaArchivo) { //Lista de archivos List<TipoLista> _TipoListaDistinctArchivo = new List<TipoLista>(); var d = _listaArchivo.Select(o=>o.strTipoLista).Distinct(); foreach (var item in d) { TipoLista _tl = new TipoLista(); _tl.strTipoLista = item; _TipoListaDistinctArchivo.Add(_tl); } //Lista BD List<TipoLista> _tipoListaBD = new List<TipoLista>(); _tipoListaBD.AddRange(rsListaNegra.ListarTipoListaPLD()); List<TipoLista> _lsF = new List<TipoLista>(); //Diferencia foreach (TipoLista item in _TipoListaDistinctArchivo) { bool existe = false; TipoLista _data = new TipoLista(); _data = item; foreach (TipoLista _item in _tipoListaBD) { if (_data.strTipoLista.ToUpper() == _item.strTipoLista.ToUpper()) { existe = true; } } if (existe == false) _lsF.Add(_data); } //No exite diferencia if (_lsF.Count == 0) return true; //Existe diferencia gvdTipoLista.DataSource = _lsF; gvdTipoLista.DataBind(); mpeAgregarTipoLista.Show(); return false; }
private int LeeArchivo(string Archivo) { int result = 0; try { StreamReader objReader = new StreamReader(fupArchivo.FileContent, System.Text.Encoding.GetEncoding(1252), false); string [] strEntities; string sLine = ""; List<ListaNegraService.ListaNegra> lstListaNegra = new List<ListaNegraService.ListaNegra>(); int count = 0; sLine = objReader.ReadLine(); if (identificaColumnas(sLine) == 1) { while (sLine != null) { if (sLine != null) { if (count != 0) { sLine = sLine.Replace("|", ""); ListaNegraService.ListaNegra listaNegra = new ListaNegraService.ListaNegra(); strEntities = sLine.Split(new char[] { '\t' }); if (strEntities[entity[0]] != "" && strEntities[entity[20]] != "" && strEntities[entity[7]] != "") { listaNegra.VCHTIPOLISTA = strEntities[entity[0]]; listaNegra.VCHIDQEQ = strEntities[entity[0]] + '|'; listaNegra.VCHNOMBRE = entity[1] != -1 ? QuitarCaracteresEspeciales(strEntities[entity[1]]).ToUpper() + '|' : "" + '|'; listaNegra.VCHAPPATERNO = entity[2] != -1 ? QuitarCaracteresEspeciales(strEntities[entity[2]]).ToUpper() + '|' : "" + '|'; listaNegra.VCHAPMATERNO = entity[3] != -1 ? QuitarCaracteresEspeciales(strEntities[entity[3]]).ToUpper() + '|' : "" + '|'; listaNegra.iProveedorId = ddlProveedores.SelectedValue; if (entity[4] != -1) listaNegra.VCHCURP = strEntities[entity[4]] + '|'; else listaNegra.VCHCURP = "" + '|'; if (entity[5] != -1) listaNegra.VCHRFC = strEntities[entity[5]] + '|'; else listaNegra.VCHRFC = "" + '|'; if (entity[6] != -1) listaNegra.VCHFECHANAC = strEntities[entity[6]] + '|'; else listaNegra.VCHFECHANAC = "" + '|'; if (entity[7] != -1) listaNegra.VCHTIPOLISTA = strEntities[entity[7]] + '|'; else listaNegra.VCHTIPOLISTA = "" + '|'; if (entity[8] != -1) listaNegra.VCHESTATUS = strEntities[entity[8]] + '|'; else listaNegra.VCHESTATUS = "" + '|'; if (entity[9] != -1) listaNegra.VCHDEPENDENCIA = strEntities[entity[9]] + '|'; else listaNegra.VCHDEPENDENCIA = "" + '|'; if (entity[10] != -1) listaNegra.VCHPUESTO = strEntities[entity[10]] + '|'; else listaNegra.VCHPUESTO = "" + '|'; if (entity[11] != -1) listaNegra.INTIDDISPO = strEntities[entity[11]] + '|'; else listaNegra.INTIDDISPO = "" + '|'; if (entity[12] != -1) listaNegra.BITCURPOK = strEntities[entity[12]] + '|'; else listaNegra.BITCURPOK = "" + '|'; if (entity[13] != -1) listaNegra.VCHIDREL = strEntities[entity[13]] + '|'; else listaNegra.VCHIDREL = "" + '|'; if (entity[14] != -1) listaNegra.VCHPARENTESCO = strEntities[entity[14]] + '|'; else listaNegra.VCHPARENTESCO = "" + '|'; if (entity[15] != -1) listaNegra.VCHRAZONSOCIAL = strEntities[entity[15]] + '|'; else listaNegra.VCHRAZONSOCIAL = "" + '|'; if (entity[16] != -1) listaNegra.VCHRFCMORAL = strEntities[entity[16]] + '|'; else listaNegra.VCHRFCMORAL = "" + '|'; if (entity[17] != -1) listaNegra.VCHISSSTE = strEntities[entity[17]] + '|'; else listaNegra.VCHISSSTE = "" + '|'; if (entity[18] != -1) listaNegra.VCHIMSS = strEntities[entity[18]] + '|'; else listaNegra.VCHIMSS = "" + '|'; if (entity[19] != -1) listaNegra.VCHINGRESOS = strEntities[entity[19]] + '|'; else listaNegra.VCHINGRESOS = "" + '|'; if (entity[20] != -1) listaNegra.VCHNOMCOMPLETO = QuitarCaracteresEspeciales(strEntities[entity[20]]).ToUpper() + '|'; else listaNegra.VCHNOMCOMPLETO = "" + '|'; if (entity[21] != -1) listaNegra.VCHAPELLIDOS = QuitarCaracteresEspeciales(strEntities[entity[21]]).ToUpper() + '|'; else listaNegra.VCHAPELLIDOS = "" + '|'; if (listaNegra.VCHNOMBRE.Replace("|", "") != string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") != string.Empty && listaNegra.VCHAPMATERNO.Replace("|", "") != string.Empty) { listaNegra.vchCadenaNPM = listaNegra.VCHNOMBRE.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPPATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPMATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); listaNegra.vchCadenaNMP = listaNegra.VCHNOMBRE.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPMATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPPATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } if (listaNegra.VCHNOMBRE.Replace("|", "") != string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") == string.Empty || listaNegra.VCHAPMATERNO.Replace("|", "") == string.Empty && (listaNegra.VCHAPPATERNO.Replace("|", "") != string.Empty || listaNegra.VCHAPMATERNO.Replace("|", "") != string.Empty)) { listaNegra.vchCadenaNPM = listaNegra.VCHNOMBRE.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPPATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", "") + listaNegra.VCHAPMATERNO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } if (listaNegra.VCHNOMBRE.Replace("|", "") == string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") == string.Empty && listaNegra.VCHAPMATERNO.Replace("|", "") == string.Empty) { if (listaNegra.VCHNOMCOMPLETO.Replace("|", "") == listaNegra.VCHRAZONSOCIAL.Replace("|", "")) listaNegra.vchCadenaNPM = listaNegra.VCHNOMCOMPLETO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } if (listaNegra.VCHNOMBRE.Replace("|", "") == string.Empty && listaNegra.VCHAPPATERNO.Replace("|", "") == string.Empty && listaNegra.VCHAPMATERNO.Replace("|", "") == string.Empty) { if (listaNegra.VCHNOMCOMPLETO.Replace("|", "") != listaNegra.VCHRAZONSOCIAL.Replace("|", "")) { listaNegra.vchCadenaNPM = listaNegra.VCHRAZONSOCIAL.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); listaNegra.vchCadenaNMP = listaNegra.VCHNOMCOMPLETO.Replace("|", "").Replace(".", "").Replace(" ", "").Replace(",", "").Replace(";", "").Replace("'", "").Replace("\"", "").Replace("/", "").Replace("\\", ""); } } try { if (entity[22] != -1) listaNegra.VCHENTIDAD = strEntities[entity[22]] + '|'; else listaNegra.VCHENTIDAD = "" + '|'; if (entity[23] != -1) listaNegra.VCHGENERO = strEntities[entity[23]] + '|'; else listaNegra.VCHGENERO = "" + '|'; } catch { listaNegra.VCHENTIDAD = "|"; listaNegra.VCHGENERO = "|"; } //Nueva relación de BD //Se agrega uno por identidad y uno por bitEstatus. La identidad se auto incrementa y el bitEstatus se asigna en True lstListaNegra.Add(listaNegra); sbtxt.AppendLine("1|" + listaNegra.VCHIDQEQ + listaNegra.VCHTIPOLISTA + listaNegra.VCHNOMBRE + listaNegra.VCHAPPATERNO + listaNegra.VCHAPMATERNO + listaNegra.VCHCURP + listaNegra.VCHRFC + listaNegra.VCHFECHANAC + listaNegra.VCHESTATUS + listaNegra.VCHDEPENDENCIA + listaNegra.VCHPUESTO + listaNegra.INTIDDISPO + listaNegra.BITCURPOK + listaNegra.VCHIDREL + listaNegra.VCHPARENTESCO + listaNegra.VCHRAZONSOCIAL + listaNegra.VCHRFCMORAL + listaNegra.VCHISSSTE + listaNegra.VCHIMSS + listaNegra.VCHINGRESOS + listaNegra.VCHNOMCOMPLETO + listaNegra.VCHAPELLIDOS + listaNegra.VCHENTIDAD + listaNegra.VCHGENERO + Session["User"] + "|" + DateTime.Now.ToString("yyyy/MM/dd") + "|" + listaNegra.vchCadenaNPM + "|" + listaNegra.vchCadenaNMP + "|" + listaNegra.iProveedorId + "|1" ); } } count++; sLine = objReader.ReadLine(); } } objReader.Close(); //Persistencia de datos en archivo EscribeArchivo(sbtxt); foreach (ListaNegraService.ListaNegra item in lstListaNegra) { TipoLista _lista = new TipoLista(); _lista.strTipoLista = item.VCHTIPOLISTA.Substring(0, item.VCHTIPOLISTA.Length - 1); _listaNegraArchivo.Add(_lista); } result = 1; } //else //{ //} } catch (Exception ex) { escribeLog(ex.Message); throw ex; } return result; }
public void RefrescarItemsVistaTabla(ref VistaLista listView, TipoLista index) { listView.RedrawItems(0, MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)index].Count - 1, false); }
public void ActualizarComboBoxModificar(ref ComboBox comboBox1, ListView listView, TipoLista lista) { int longitud = comboBox1.Items.Count; if (longitud >= 3) { for (int i = longitud - 1; i > 2; i--) { comboBox1.Items.RemoveAt(i); } } if (listView.SelectedIndices.Count == 1) { if (comboBox1.Items.Count == 0) { comboBox1.Items.Add("Título"); comboBox1.Items.Add("Descripción"); comboBox1.Items.Add("Fecha de registro"); } if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Asignado) { comboBox1.Items.Add("Nombre del Alumno"); comboBox1.Items.Add("Primer Apellido"); comboBox1.Items.Add("Segundo Apellido"); comboBox1.Items.Add("Matrícula"); comboBox1.Items.Add("Fecha de inicio"); if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.Finalizado) { comboBox1.Items.Add("Fecha de defensa"); comboBox1.Items.Add("Convocatoria"); comboBox1.Items.Add("Calificación"); } } } else { comboBox1.Items.Clear(); } }
public void descripciónToolStripMenuItem_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].getMTFG.Descripcion); }
public void ActualizarComboBoxModificar(ref ComboBox comboBox1, ListView listView, TipoLista lista) { cEventos.ActualizarComboBoxModificar(ref comboBox1, listView, lista); }
public void segundoApellidoDelAlumnoToolStripMenuItem_Click(int indiceSeleccionado, TipoLista indice, object sender, EventArgs e) { Clipboard.SetText(MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)indice][indiceSeleccionado].Alumno.SegundoApellido); }
public void ActualizarDatosRichTextBox(ref RichTextBox richTextBox, ListView listView, TipoLista indiceLista, TDatos mostrar) { if (listView.SelectedIndices.Count == 1) { richTextBox.Text = cEventos.ActualizarDatosRichTextBox(listView.SelectedIndices[0], indiceLista, mostrar); } else { richTextBox.Clear(); } }
private bool InsereDetalheQuadro(ref IUnitOfWork unitOfWork, DateTime dataControle, Congregacao item, int codigoQuadro, TipoLista itemTipoLista) { var cont = 0; ControleLista proximoLista = null; bool liberouproximo = false; QuadroDetalhe quadrodetalhe = null; DataEvento evento = _repositoryDataEvento.ListByDate(ref unitOfWork, item.Codigo, dataControle); var ultimaReuniao = _repositoryQuadroDetalhe.ObterUltimaReuniaoValida(ref unitOfWork, item.Codigo, dataControle); var proximaReuniao = _repositoryQuadroDetalhe.ObterProximaReuniaoValida(ref unitOfWork, item.Codigo, dataControle); if (evento == null || (evento.VisitaSuperintendente && itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.LeitorELC && itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.LeitorJW)) { if (item.FolgaParticipacao && itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.OracaoFinal && itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.OracaoInicial && (itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.AudioVideo)) { if (itemTipoLista.Codigo == Core.Domain.enums.eTipoLista.Indicador) { cont = 16; } while (proximoLista == null) { if (cont <= 15) { proximoLista = _repositoryControleLista.ObterProximoListaSemRepetirComFolga(ref unitOfWork, (int)itemTipoLista.Codigo, (ultimaReuniao == null) ? dataControle.AddDays(-1) : ultimaReuniao.Data, dataControle, (proximaReuniao == null) ? dataControle.AddDays(1) : proximaReuniao.Data, item.Codigo); } else if (cont > 15 && cont <= 30) { proximoLista = _repositoryControleLista.ObterProximoListaSemRepetirSemFolgaParaAudioSonoro(ref unitOfWork, (int)itemTipoLista.Codigo, (ultimaReuniao == null) ? dataControle.AddDays(-1) : ultimaReuniao.Data, dataControle, (proximaReuniao == null) ? dataControle.AddDays(1) : proximaReuniao.Data, item.Codigo); } else if (cont > 30 && cont <= 50) { proximoLista = _repositoryControleLista.ObterProximoListaSemRepetirSemFolga(ref unitOfWork, (int)itemTipoLista.Codigo, dataControle, (ultimaReuniao == null) ? dataControle.AddDays(-1) : ultimaReuniao.Data, (proximaReuniao == null) ? dataControle.AddDays(1) : proximaReuniao.Data, item.Codigo); } else { throw new Exception("Não foi possivel obter um irmão da lista "); } if (proximoLista == null) { _repositoryControleLista.LiberaProximoLista(ref unitOfWork, (int)itemTipoLista.Codigo, item.Codigo); liberouproximo = true; } cont++; Task.Delay(10).Wait(); } } else if (itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.OracaoFinal && itemTipoLista.Codigo != Core.Domain.enums.eTipoLista.OracaoInicial && ((itemTipoLista.Codigo == Core.Domain.enums.eTipoLista.AudioVideo) || (!item.FolgaParticipacao))) { while (proximoLista == null) { if (cont <= 25) { proximoLista = _repositoryControleLista.ObterProximoListaSemRepetirSemFolga(ref unitOfWork, (int)itemTipoLista.Codigo, dataControle, (ultimaReuniao == null) ? dataControle.AddDays(-1) : ultimaReuniao.Data, (proximaReuniao == null) ? dataControle.AddDays(1) : proximaReuniao.Data, item.Codigo); } else { proximoLista = _repositoryControleLista.ObterProximoListaSemRepetirSemFolgaParaAudioSonoro(ref unitOfWork, (int)itemTipoLista.Codigo, (ultimaReuniao == null) ? dataControle.AddDays(-1) : ultimaReuniao.Data, dataControle, (proximaReuniao == null) ? dataControle.AddDays(1) : proximaReuniao.Data, item.Codigo); } if (proximoLista == null) { _repositoryControleLista.LiberaProximoLista(ref unitOfWork, (int)itemTipoLista.Codigo, item.Codigo); liberouproximo = true; } if (cont > 50) { throw new Exception("Não foi possivel obter um irmão da lista de audio e video"); } cont++; } } else { while (proximoLista == null) { proximoLista = _repositoryControleLista.ObterProximoListaPodeRepetir(ref unitOfWork, (int)itemTipoLista.Codigo, item.Codigo, dataControle); if (proximoLista == null) { _repositoryControleLista.LiberaProximoLista(ref unitOfWork, (int)itemTipoLista.Codigo, item.Codigo); liberouproximo = true; } } } quadrodetalhe = new QuadroDetalhe() { Data = dataControle, IrmaoId = proximoLista.IrmaoId, QuadroId = codigoQuadro }; _repositoryControleLista.AtualizaPartipacaoIrmaoLista(ref unitOfWork, (int)itemTipoLista.Codigo, proximoLista.IrmaoId, liberouproximo); } else { quadrodetalhe = new QuadroDetalhe() { Data = dataControle, QuadroId = codigoQuadro, EventoId = evento.Codigo } }; _repositoryQuadroDetalhe.InsereDataQuadro(ref unitOfWork, quadrodetalhe); return((evento != null && evento.Assembleia) ? true : false); } }
public Form8(VistaLista listView, TipoLista lista) { InitializeComponent(); this.listView = listView; this.lista = lista; copiar = new Copiar(); titulo.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.Titulo; descripcion.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.Descripcion; registro.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.Fecha.Date.ToShortDateString(); profesor_nombre.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Profesor.Nombre; profesor_apellido_1.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Profesor.PrimerApellido; profesor_apellido_2.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Profesor.SegundoApellido; profesor_despacho.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Profesor.Despacho; profesor_correo.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Profesor.Correo; if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Asignado) { alumno_nombre.Enabled = true; alumno_apellido_1.Enabled = true; alumno_apellido_2.Enabled = true; alumno_matricula.Enabled = true; alumno_inicio.Enabled = true; alumno_nombre.BackColor = SystemColors.ControlLightLight; alumno_apellido_1.BackColor = SystemColors.ControlLightLight; alumno_apellido_2.BackColor = SystemColors.ControlLightLight; alumno_matricula.BackColor = SystemColors.ControlLightLight; alumno_inicio.BackColor = SystemColors.ControlLightLight; alumno_nombre.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Alumno.Nombre; alumno_apellido_1.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Alumno.PrimerApellido; alumno_apellido_2.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Alumno.SegundoApellido; alumno_matricula.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Alumno.Matricula; alumno_inicio.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].Alumno.FechaInicio.Date.ToShortDateString(); if (MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.Finalizado) { finalizar_defensa.Enabled = true; finalizar_convocatoria.Enabled = true; finalizar_calificacion.Enabled = true; finalizar_defensa.BackColor = SystemColors.ControlLightLight; finalizar_convocatoria.BackColor = SystemColors.ControlLightLight; finalizar_calificacion.BackColor = SystemColors.ControlLightLight; finalizar_defensa.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.getMFinalizado.Defensa.Date.ToShortDateString(); finalizar_convocatoria.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.getMFinalizado.Convocatoria; finalizar_calificacion.Text = MListaProyectos.getMListaProyectos.getMProyectos.Proyectos[(int)lista][listView.SelectedIndices[0]].getMTFG.getMFinalizado.Nota.ToString(); estado.Text = "Finalizado"; estado.ForeColor = Color.Green; } else { finalizar_defensa.BackColor = SystemColors.Control; finalizar_convocatoria.BackColor = SystemColors.Control; finalizar_calificacion.BackColor = SystemColors.Control; finalizar_defensa.Enabled = false; finalizar_convocatoria.Enabled = false; finalizar_calificacion.Enabled = false; estado.Text = "No Finalizado"; estado.ForeColor = Color.Goldenrod; } } else { alumno_nombre.BackColor = SystemColors.Control; alumno_apellido_1.BackColor = SystemColors.Control; alumno_apellido_2.BackColor = SystemColors.Control; alumno_matricula.BackColor = SystemColors.Control; alumno_inicio.BackColor = SystemColors.Control; finalizar_defensa.BackColor = SystemColors.Control; finalizar_convocatoria.BackColor = SystemColors.Control; finalizar_calificacion.BackColor = SystemColors.Control; alumno_nombre.Enabled = false; alumno_apellido_1.Enabled = false; alumno_apellido_2.Enabled = false; alumno_matricula.Enabled = false; alumno_inicio.Enabled = false; finalizar_defensa.Enabled = false; finalizar_convocatoria.Enabled = false; finalizar_calificacion.Enabled = false; estado.Text = "No Asignado"; estado.ForeColor = Color.Maroon; } }