コード例 #1
0
        private void SetearFila(DataGridViewRow r, DetalleVentaListDto detalleVentaListDto)
        {
            r.Cells[cmnProducto.Index].Value       = detalleVentaListDto.Producto;
            r.Cells[cmnPrecioUnitario.Index].Value = detalleVentaListDto.PrecioUnitario.ToString("c");
            r.Cells[cmnCantidad.Index].Value       = detalleVentaListDto.Cantidad;
            r.Cells[cmnTotal.Index].Value          = detalleVentaListDto.Total.ToString("C");

            r.Tag = detalleVentaListDto;
        }
コード例 #2
0
ファイル: Helper.cs プロジェクト: ciminoce/Neptuno2021
        public static List <DetalleVentaListDto> ConstruirListaItemsListDto(List <DetalleVentaEditDto> itemsEditDto)
        {
            var listaDto = new List <DetalleVentaListDto>();

            foreach (var item in itemsEditDto)
            {
                var itemDto = new DetalleVentaListDto()
                {
                    DetalleVentaId = item.DetalleVentaId,
                    Producto       = item.Producto.NombreProducto,
                    PrecioUnitario = item.Precio,
                    Cantidad       = item.Cantidad
                };
                listaDto.Add(itemDto);
            }

            return(listaDto);
        }