![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
16/08/2011, 11:09
|
![Avatar de costesensey2](http://static.forosdelweb.com/customavatars/avatar376623_1.gif) | | | Fecha de Ingreso: noviembre-2010
Mensajes: 38
Antigüedad: 14 años, 3 meses Puntos: 0 | |
Respuesta: problema para resolver yo estoy trabajando en c#
necesito actualizar y eliminar....
trabajo en tres capas
para actualizar tengo este codigo
private void btnActualizar_Click(object sender, EventArgs e)
{
nHerramienta nH;
if (grd.Rows.Count > 0)
{
nH = c.findHerramienta(int.Parse(grd.Rows[grd.SelectedRows.Count].Cells[1].RowIndex.ToString()));
nH.Item = txtItem.Text;
nH.Descripcion = txtDescripcion.Text;
nH.Unidad = cboUnidades.Text;
nH.Marca = cboMarca.Text;
nH.Referencia = txtReferencia.Text;
nH.Modelo = txtModelo.Text;
nH.Codigo = txtCodigo.Text;
nH.NºPiezas = txtNpieza.Text;
nH.Ubicacion = cboUbicacion.Text;
if (c.upHerramienta(nH))
{
grd.DataSource = null;
grd.DataSource = c.LstHerramienta;
}
}
} |