bool AlSolicitarSincro(CmdSincronizar c) { //Diálogo modal para confirmar sincronización frmAfectados w = new frmAfectados(c.ObtenerDatos(), string.Format("Registros que serán afectados al {0}", c.Descripcion)); w.StartPosition = FormStartPosition.CenterParent; w.ShowDialog(this); return(w.DialogResult == DialogResult.OK); }
private bool Exec(CmdSincronizar c, SyncroStep step) { bool r = false; DataTable dt; string msg = string.Empty; switch (step) { case SyncroStep.ExceptionsCfg: this.ComandoComienza(c, " >>> FASE DE CONFIGURACIÓN DE EXCEPCIONES", step); if (c.Direccion != TipoComprobacion.ModificacionesPendientesEnSIGUA) { this.ComandoSolicitaExcepcionesSincro(c); } break; case SyncroStep.Simulation: this.ComandoComienza(c, " >>> FASE DE SIMULACIÓN", step); dt = c.Simular(); if (dt.TableName == "Excepcion") { this.ComandoInforma((string)dt.Rows[0]["Mensaje"]); r = true; } else { if (dt.Rows.Count > 0) { this.ComandoObtieneDatosCriticos(dt); this.ComandoInforma("¡ATENCIÓN: SE DETECTARON INCIDENCIAS DURANTE LA FASE DE SIMULACIÓN!"); r = true; } else { this.ComandoInforma("NO SE DETECTARON INCIDENCIAS DURANTE LA FASE DE SIMULACIÓN"); } } break; case SyncroStep.Transaction: this.ComandoComienza(c, " >>> FASE DE TRANSACCIÓN", step); dt = c.ObtenerDatos(); if (dt.TableName == "Excepcion") { this.ComandoInforma((string)dt.Rows[0]["Mensaje"]); r = true; } else { if (this.ComandoSolicitaSincro(c)) { DataTable dt1 = c.Sincronizar(); msg = (string)dt1.Rows[0]["Mensaje"]; this.ComandoInforma(msg); r = true; } else { this.ComandoInforma("TRANSACCIÓN CANCELADA"); r = true; } } break; } return(r); }