public void GuardarNotificaciones(D_COD_ESTADO_NOTIFICACION estadoNotif) { string codPersonas = string.Empty; _agentesInvolucrados.Add(_cndc); foreach (var a in _agentesInvolucrados) { Notificacion n = new Notificacion(); n.PkCodFalla = _regFalla.CodFalla; n.PkCodPersona = a.PkCodPersona; n.DCodEstado = "1"; n.EsNuevo = !ModeloMgr.Instancia.NotificacionMgr.Existe(_regFalla.CodFalla, a.PkCodPersona); n.DCodEstadoNotificacion = (long)estadoNotif; if (n.EsNuevo || estadoNotif != D_COD_ESTADO_NOTIFICACION.REGISTRADO) { ModeloMgr.Instancia.NotificacionMgr.Guardar(n); } codPersonas += a.PkCodPersona + ","; } if (codPersonas != string.Empty) { codPersonas = string.Format("({0})", codPersonas.Substring(0, codPersonas.Length - 1)); ModeloMgr.Instancia.NotificacionMgr.BorrarNotificacionesIncorrectas(_regFalla.CodFalla, codPersonas); } _agentesInvolucrados.Remove(_cndc); }
public DataTable GetTablaConfirmacionSinc(DataTable tabla) { DataTable resultado = new DataTable(); DataColumn c = new DataColumn(Notificacion.C_PK_COD_FALLA, typeof(int)); resultado.Columns.Add(c); foreach (DataRow r in tabla.Rows) { D_COD_ESTADO_NOTIFICACION estadoNotif = (D_COD_ESTADO_NOTIFICACION)(long)r[Notificacion.C_D_COD_ESTADO_NOTIFICACION]; long pkCodPersona = (long)r[Notificacion.C_PK_COD_PERSONA]; if (pkCodPersona == Sesion.Instancia.EmpresaActual.PkCodPersona && estadoNotif != D_COD_ESTADO_NOTIFICACION.RECIBIDO) { DataRow rr = resultado.NewRow(); rr[Notificacion.C_PK_COD_FALLA] = r[Notificacion.C_PK_COD_FALLA]; resultado.Rows.Add(rr); } } return(resultado); }
private Bitmap GetImageNotif(object obj) { Bitmap resultado = null; long eNotif = (long)obj; D_COD_ESTADO_NOTIFICACION estadoNotif = (D_COD_ESTADO_NOTIFICACION)eNotif; switch (estadoNotif) { case D_COD_ESTADO_NOTIFICACION.REGISTRADO: resultado = global::SISFALLA.Properties.Resources.notifRegistrada1; break; case D_COD_ESTADO_NOTIFICACION.ENVIADO: resultado = global::SISFALLA.Properties.Resources.notifEnviada1; break; case D_COD_ESTADO_NOTIFICACION.RECIBIDO: resultado = global::SISFALLA.Properties.Resources.notifRecibida; break; } return(resultado); }