Пример #1
0
        public void ObtenerConcurso(DtoConcurso objConcurso)
        {
            SqlCommand command = new SqlCommand("SP_Obtener_Concurso", conexion);

            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.AddWithValue("@id", objConcurso.PK_IC_IdConcurso);
            DataSet ds = new DataSet();

            conexion.Open();
            SqlDataAdapter moldura = new SqlDataAdapter(command);

            moldura.Fill(ds);
            moldura.Dispose();

            SqlDataReader reader = command.ExecuteReader();

            while (reader.Read())
            {
                objConcurso.PK_IC_IdConcurso  = int.Parse(reader[0].ToString());
                objConcurso.VC_NombreCon      = reader[1].ToString();
                objConcurso.VC_LugarCon       = reader[2].ToString();
                objConcurso.DTC_FechaConcurso = Convert.ToDateTime(reader[3].ToString());
                objConcurso.DC_PrecioSeriado  = double.Parse(reader[4].ToString());
                objConcurso.DC_PrecioNovel    = double.Parse(reader[5].ToString());
                objConcurso.FK_IEC_IdEstado   = int.Parse(reader[6].ToString());
            }
            conexion.Close();
            conexion.Dispose();
        }
Пример #2
0
        public void RegistrarConcurso(DtoConcurso objConcurso)
        {
            SqlCommand command = new SqlCommand("SP_Registrar_Concurso", conexion);

            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.AddWithValue("@nombre", objConcurso.VC_NombreCon);
            command.Parameters.AddWithValue("@direccion", objConcurso.VC_LugarCon);
            command.Parameters.AddWithValue("@fechac", objConcurso.DTC_FechaConcurso);
            command.Parameters.AddWithValue("@cantS", objConcurso.DC_PrecioSeriado);
            command.Parameters.AddWithValue("@cantN", objConcurso.DC_PrecioNovel);

            conexion.Open();
            command.ExecuteNonQuery();
            conexion.Close();
        }
Пример #3
0
        protected void btnIr_Click(object sender, EventArgs e)
        {
            _log.CustomWriteOnLog("inscribir Participante", "ddlConcurso");
            DtoConcurso objCon = new DtoConcurso();

            objCon.PK_IC_IdConcurso = Convert.ToInt32(ddlConcurso.SelectedValue);
            _log.CustomWriteOnLog("inscribir Participante", "codConcurso: " + ddlConcurso.SelectedValue);
            objCtrConcurso.ObtenerConcurso(objCon);
            _log.CustomWriteOnLog("inscribir Participante", "precioSeriado: " + objCon.DC_PrecioSeriado.ToString());
            _log.CustomWriteOnLog("inscribir Participante", "precioNovel: " + objCon.DC_PrecioNovel.ToString());
            lblprecioS.Text = objCon.DC_PrecioSeriado.ToString();
            lblprecioN.Text = objCon.DC_PrecioNovel.ToString();
            string m = "Precios Calculados";

            Utils.AddScriptClientUpdatePanel(upnBotonBuscar1, "showMessage('top','center','" + m + "','successs')");
        }
Пример #4
0
 public void ObtenerConcurso(DtoConcurso objc)
 {
     objDaoConcurso.ObtenerConcurso(objc);
 }
Пример #5
0
 public void ActualizarConcurso(DtoConcurso objc)
 {
     objDaoConcurso.ActualizarConcurso(objc);
 }
Пример #6
0
 public void RegistrarConcurso(DtoConcurso objc)
 {
     objDaoConcurso.RegistrarConcurso(objc);
 }