예제 #1
0
파일: Reto.cs 프로젝트: Reyeselda95/TAES
        //Guarda los cambios y hace commmit en la BBDD
        //Pone active a false
        private void button2_Click(object sender, EventArgs e)
        {
            RetoCEN     retocen = new RetoCEN();
            ConcursoCEN concen  = new ConcursoCEN();

            if (reto == null)
            {
                reto             = new RetoEN();
                reto.Concurso    = campaign.Concur;
                reto.Active      = false;
                reto.Nombre      = textBox1.Text;
                reto.Descripcion = richTextBox1.Text;
                reto.FechaFin    = (DateTime)dateTimePicker1.Value;
                reto.Id          = retocen.New_(campaign.Concur.Id, textBox1.Text, richTextBox1.Text, (DateTime)dateTimePicker1.Value, false);
            }
            else
            {
                reto.FechaFin    = dateTimePicker1.Value;
                reto.Nombre      = textBox1.Text;
                reto.Descripcion = richTextBox1.Text;
                reto.Active      = false;
                retocen.get_IRetoCAD().Modify(reto);
            }
            //Actualiza la vista anterior
            this.Reto_Load(sender, e);
            campaign.Campaña_Load(sender, e);
        }
예제 #2
0
        public Reto getReto(int id)
        {
            RetoCEN retocen = new RetoCEN();
            RetoEN  retoEN  = retocen.get_IRetoCAD().ReadOID(id);

            return(new Reto(retoEN));
        }