protected void hfParticipante_ValueChanged(object sender, EventArgs e) { try { string numJ = Session["ApellidoM"].ToString(); _log.CustomWriteOnLog("calificar Participante", "jurado es: " + numJ); objdtopuntaje.IP_Puntaje = int.Parse(hfBoton.Value); _log.CustomWriteOnLog("calificar Participante", "puntaje es: " + hfBoton.Value); objdtopuntaje.FK_IUMT_UsuModTan = hfParticipante.Value + txtTanda.Text; _log.CustomWriteOnLog("calificar Participante", "participante es: " + hfParticipante.Value + txtTanda.Text); objdtopuntaje.IP_NumeroJurado = int.Parse(numJ); _log.CustomWriteOnLog("calificar Participante", "jurado es: " + numJ); if (objctrpuntaje.existePuntaje(objdtopuntaje)) { objctrpuntaje.ActualizarPuntaje(objdtopuntaje); _log.CustomWriteOnLog("calificar Participante", "se Actualizó puntaje"); } else { DtoUsuarioModalidadTanda objUTM = new DtoUsuarioModalidadTanda(); objUTM.PK_IUMT_CodUsuModTan = hfParticipante.Value + txtTanda.Text; CtrTanda objctr = new CtrTanda(); objctrpuntaje.RegistrarPuntaje(objdtopuntaje); objctr.actualizarEstadoUMT(objUTM); _log.CustomWriteOnLog("calificar Participante", "se registró puntaje"); } hfBoton.Value = ""; hfParticipante.Value = ""; } catch (Exception ex) { _log.CustomWriteOnLog("calificar Participante", "Error : " + ex.Message + "Stac" + ex.StackTrace); } }
public int sumaPuntaje(DtoUsuarioModalidadTanda objUMT) { try { SqlCommand command = new SqlCommand("SP_SumarPuntaje_UMT", conexion); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@id", objUMT.PK_IUMT_CodUsuModTan); DataSet ds = new DataSet(); conexion.Open(); SqlDataAdapter moldura = new SqlDataAdapter(command); moldura.Fill(ds); moldura.Dispose(); SqlDataReader reader = command.ExecuteReader(); int suma = 0; while (reader.Read()) { suma = Convert.ToInt32(reader[0].ToString()); } conexion.Close(); return(suma); } catch (Exception) { throw; } }
public void actualizar_estado_umt(DtoUsuarioModalidadTanda objUMT) { try { SqlCommand command = new SqlCommand("SP_Actualizar_Estado_UMT", conexion); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@id", objUMT.PK_IUMT_CodUsuModTan); conexion.Open(); command.ExecuteNonQuery(); conexion.Close(); } catch (Exception ex) { throw; } }
public DataTable ListarParticipantesXtanda(DtoUsuarioModalidadTanda objUMT) { DataTable dtParticipantes = null; conexion.Open(); SqlCommand command = new SqlCommand("SP_Obtener_Participante_x_Tanda", conexion); command.Parameters.AddWithValue("@idT", objUMT.FK_IT_CodTan); SqlDataAdapter daAdaptador = new SqlDataAdapter(command); command.CommandType = CommandType.StoredProcedure; dtParticipantes = new DataTable(); daAdaptador.Fill(dtParticipantes); conexion.Close(); return(dtParticipantes); }
//mover a DAO_Usuario_modalidad_tanda public void registrarUMT(DtoUsuarioModalidadTanda objUMT) { try { SqlCommand command = new SqlCommand("SP_Asignar_Tanda", conexion); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@ID", objUMT.PK_IUMT_CodUsuModTan); command.Parameters.AddWithValue("@cod", objUMT.FK_IUM_CodUM); command.Parameters.AddWithValue("@idT", objUMT.FK_IT_CodTan); command.Parameters.AddWithValue("@pista", objUMT.IUMT_Pista); conexion.Open(); command.ExecuteNonQuery(); conexion.Close(); } catch (Exception) { throw; } }
public void actualizarPuntajeT(DtoUsuarioModalidadTanda objUMT) { objDaoTanda.actualizar_PuntajeT_umt(objUMT); }
public int sumaPuntajes(DtoUsuarioModalidadTanda objUMT) { return(objDaoTanda.sumaPuntaje(objUMT)); }
public void actualizarEstadoUMT(DtoUsuarioModalidadTanda objUMT) { objDaoTanda.actualizar_estado_umt(objUMT); }
public DataTable obtenerParticipantesxTanda(DtoUsuarioModalidadTanda objUMT) { return(objDaoTanda.ListarParticipantesXtanda(objUMT)); }
//pasar a ctr_usuarioModalidadTanda public void registrarUMT(DtoUsuarioModalidadTanda objUMT) { objDaoTanda.registrarUMT(objUMT); }