예제 #1
0
        public void MostrarItem(UltraGridRow Row)
        {
            ItemNotaDebito Item = (ItemNotaDebito)Row.Tag;

            Row.Cells[colCodigo].Value      = Item.Codigo;
            Row.Cells[colDescripcion].Value = Item.Descripcion;
            Row.Cells[colPrecio].Value      = Item.Precio;
            Row.Cells[colCantidad].Value    = Item.Cantidad;
            Row.Cells[colTotal].Value       = Item.Total;
            Row.Cells[colObservacion].Value = Item.Observacion;
        }
예제 #2
0
        private void ugItems_CellChange(object sender, CellEventArgs e)
        {
            try
            {
                ItemNotaDebito Item = (ItemNotaDebito)e.Cell.Row.Tag;
                switch (e.Cell.Column.Key)
                {
                case colCodigo:
                    Item.Codigo = e.Cell.Text;
                    break;

                case colDescripcion:
                    Item.Descripcion = e.Cell.Text;
                    break;

                case colPrecio:
                    Item.Precio = Convert.ToDecimal(e.Cell.Text.Replace('_', ' '));
                    break;

                case colCantidad:
                    Item.Cantidad = Convert.ToDecimal(e.Cell.Text.Replace('_', ' '));
                    break;

                case colObservacion:
                    Item.Observacion = e.Cell.Text;
                    break;

                default:
                    break;
                }
                MostrarItem(e.Cell.Row);
                MostrarTotales();
            }
            catch (Exception ex)
            {
                SoftException.Control(ex);
            }
        }