This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Pedidos a proveedor/Cliente/uViewDetallesPedidosProveedor.pas
2007-06-21 16:02:50 +00:00

74 lines
2.4 KiB
ObjectPascal

unit uViewDetallesPedidosProveedor;
interface
uses
Windows, Messages, cxImageComboBox,
cxTextEdit, cxSpinEdit, cxStyles, cxCustomData, cxGraphics, cxFilter,
cxData, cxDataStorage, cxEdit, DB, cxDBData, ImgList, Controls,
PngImageList, uDADataTable, Classes, ActnList, ComCtrls, ToolWin,
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxClasses, cxControls, cxGridCustomView, cxGrid, uViewDetallesFamilias,
cxCheckBox, cxMaskEdit, cxCurrencyEdit, uViewDetallesNormales;
type
TfrViewDetallesPedidosProveedor = class(TfrViewDetallesNormales)
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewCANTIDAD: TcxGridDBColumn;
cxGridViewIMPORTEUNIDAD: TcxGridDBColumn;
cxGridViewIMPORTETOTAL: TcxGridDBColumn;
cxGridViewPOSICION: TcxGridDBColumn;
procedure cxGridViewEditing(Sender: TcxCustomGridTableView;
AItem: TcxCustomGridTableItem; var AAllow: Boolean);
procedure cxGridViewVISIBLEStylesGetContentStyle(
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
end;
implementation
uses
Variants, uBizImportesDetalleBase, SysUtils;
{$R *.dfm}
procedure TfrViewDetallesPedidosProveedor.cxGridViewEditing(
Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem;
var AAllow: Boolean);
var
IndiceCol : Integer;
begin
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_IMPORTEPUNTOS).Index;
if AItem.Index = IndiceCol then
begin
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_TIPODETALLE).Index;
if (UpperCase(AItem.GridView.Items[IndiceCol].EditValue) = TIPODETALLE_SUBTOTAL) then
AAllow := False
else
AAllow := True
end
else
inherited;
end;
procedure TfrViewDetallesPedidosProveedor.cxGridViewVISIBLEStylesGetContentStyle(
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
var
IndiceCol : Integer;
ATipo : String;
begin
{ if Assigned(ARecord) then
begin
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_TIPODETALLE).Index;
ATipo := VarToStr(ARecord.Values[IndiceCol]);
if ATipo = TIPODETALLE_SUBTOTAL then
AStyle := cxStyle_SUBTOTAL;
if ATipo = TIPODETALLE_TITULO then
AStyle := cxStyle_TITULO;
end;}
end;
end.