protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { CLNDetalleAlmacen clndetalle = new CLNDetalleAlmacen(); CENDatosDetalleAlmacen cendatosalmacen = new CENDatosDetalleAlmacen(); List <CENDetalleAlmacen> lista = new List <CENDetalleAlmacen>(); CLNProducto clnproducto = new CLNProducto(); if (e.CommandName.Equals("ver")) { String[] Datos = e.CommandArgument.ToString().Split('-'); codProducto.Text = Datos[0]; DescProducto.Text = Datos[1]; cendatosalmacen = clndetalle.Listadatosdetallealmacen(codProducto.Text.Trim()); lista = cendatosalmacen.DatosDetalleAlmacen; GridVie.DataSource = lista; GridVie.DataBind(); txttotalStock.Text = clnproducto.ObtenerMontoTotalAlmacen(codProducto.Text.Trim()).ToString(); mdeVerDetalle.Show(); } else if (e.CommandName.Equals("modificar")) { String[] Datoss = e.CommandArgument.ToString().Split('-'); codigoproducto.Text = Datoss[CENConstante.g_const_0]; descripcionproducto.Text = Datoss[CENConstante.g_const_1]; cendatosalmacen = clndetalle.Listadatosdetallealmacen(codigoproducto.Text.Trim()); lista = cendatosalmacen.DatosDetalleAlmacen; GridViewmd.DataSource = lista; GridViewmd.DataBind(); txtTotalStockactualizado.Text = clnproducto.ObtenerMontoTotalAlmacen(codigoproducto.Text.Trim()).ToString(); mdemodificardetalle.Show(); } }
public CENDatosDetalleAlmacen Listadatosdetallealmacen(string codArticulo) { //CLASE DE LISTA DE DETALLE DE ALMACENES CENDatosDetalleAlmacen listaalmacenes = new CENDatosDetalleAlmacen(); CADProducto consulta = new CADProducto(); try { listaalmacenes = consulta.CENdatosdetallealmacen(codArticulo); return(listaalmacenes); } catch (Exception ex) { throw ex; } }