예제 #1
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     int ID = ((Entidades.Materia)this.dgvMaterias.SelectedRows[0].DataBoundItem).IdMateria;
     MateriaLogic md = new MateriaLogic();
     md.Delete(ID);
     this.Listar();
 }
예제 #2
0
 public MateriaDesktop(int ID, ModoForm modo)
     : this()
 {
     this.Modo = modo;
     MateriaLogic materia = new MateriaLogic();
     MateriaActual = materia.GetOne(ID);
     MapearDeDatos();
 }
예제 #3
0
 protected void btnAceptar_Click(object sender, EventArgs e)
 {
     MateriaLogic ml = new MateriaLogic();
     listmateria = ml.GetAll(listplan[ddlPlan.SelectedIndex].ID);
     this.gvPlan.DataSource = listmateria;
     this.gvPlan.DataBind();
     this.gridPanel.Visible = true;
 }
예제 #4
0
 public void Listar()
 {
     MateriaLogic ml = new MateriaLogic();
     try
     {
         this.dgvMaterias.DataSource = ml.GetAll();
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message);
     }
 }
예제 #5
0
 public MateriaDesktop(int ID, ModoForm modo): this()
 {
     this.Modo = modo;
     MateriaLogic ml = new MateriaLogic();
     try
     {
         MateriaActual = ml.GetOne(ID);
     }
     catch (Exception Ex)
     {
         this.Notificar(Ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     this.MapearDeDatos();
 }
예제 #6
0
 public MateriaDesktop(ModoForm modo,int ID): this()
 {
     _modo=modo;
     MateriaLogic ml = new MateriaLogic();
     MateriaActual = ml.GetOne(ID);
     this.MapearDeDatos();
     switch(_modo)
     {case ModoForm.Modificacion:
     btnAceptar.Text = "Guardar";
     break;
     case ModoForm.Baja:
     btnAceptar.Text = "Eliminar";
     break;
     case ModoForm.Consulta:
     btnAceptar.Text = "Aceptar";
     break;
     }    
 }
예제 #7
0
 public override void GuardarCambios()
 {
     MapearADatos();
     MateriaLogic materia = new MateriaLogic();
     materia.Save(MateriaActual);
 }
예제 #8
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            if (btnAceptar.Text == "Guardar")
            {
                if (Validar())
                {
                    GuardarCambios();
                    Plan planSeleccionado = listplan[cmbIDPlan.SelectedIndex];
                    MateriaActual.State = Entidad.States.Modificado;
                    this.Close();
                }
            }

            if (btnAceptar.Text == "Eliminar")
            {
                MateriaLogic mat = new MateriaLogic();
                mat.Delete(MateriaActual.ID);
                MateriaActual.State = Entidad.States.Eliminado;
                this.Close();
            }
        }
예제 #9
0
        public void GuardarCambios()
        {
            this.MapearADatos();
            MateriaLogic Materia = new MateriaLogic();
            try
            {
                Materia.Save(MateriaActual);
            }
            catch (Exception Ex)
            {
                this.Notificar(Ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }
예제 #10
0
 public override void GuardarCambios()
 {
     this.MapearADatos();
     MateriaLogic ml = new MateriaLogic();
     ml.Save(MateriaActual);
 }
예제 #11
0
 public void Listar()
 {
     MateriaLogic ml = new MateriaLogic();
     this.dgvMaterias.DataSource = ml.GetAll();
 }
예제 #12
0
파일: Cursos.aspx.cs 프로젝트: serasio/TP2
 private void CargarMaterias(int IDPlan)
 {
     MateriaLogic ml = new MateriaLogic();
     ml.GetAll(IDPlan);
     DropDownListMateria.DataSource=listmat;
     DropDownListMateria.DataTextField= "Descripcion";
     DropDownListMateria.DataBind();
 }