From 7877631c953a2b3fc480e39fa895e812ff33d828 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 18 Sep 2007 17:12:25 +0000 Subject: [PATCH] git-svn-id: https://192.168.0.254/svn/Proyectos.Varela_PuntosVenta/trunk@62 1c943782-d109-9647-9548-93b3ac332352 --- .../Stock/Cliente/uViewFiltrosStock.dfm | 72 ------------ .../Stock/Cliente/uViewFiltrosStock.pas | 111 ------------------ 2 files changed, 183 deletions(-) delete mode 100644 Source/Modulos/Stock/Cliente/uViewFiltrosStock.dfm delete mode 100644 Source/Modulos/Stock/Cliente/uViewFiltrosStock.pas diff --git a/Source/Modulos/Stock/Cliente/uViewFiltrosStock.dfm b/Source/Modulos/Stock/Cliente/uViewFiltrosStock.dfm deleted file mode 100644 index e2ead5c..0000000 --- a/Source/Modulos/Stock/Cliente/uViewFiltrosStock.dfm +++ /dev/null @@ -1,72 +0,0 @@ -object frViewFiltrosStock: TfrViewFiltrosStock - Left = 0 - Top = 0 - Width = 537 - Height = 105 - Color = clWindow - ParentBackground = False - ParentColor = False - TabOrder = 0 - object dxLayoutControl1: TdxLayoutControl - Left = 0 - Top = 0 - Width = 537 - Height = 41 - Align = alTop - ParentBackground = True - TabOrder = 0 - AutoContentSizes = [acsWidth, acsHeight] - object cbColeccion: TcxComboBox - Left = 64 - Top = 10 - Properties.DropDownListStyle = lsFixedList - Properties.DropDownRows = 18 - Properties.ReadOnly = False - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = True - Style.ButtonStyle = bts3D - Style.PopupBorderStyle = epbsFrame3D - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 0 - Width = 168 - end - object ccbCentro: TJvCheckedComboBox - Left = 280 - Top = 10 - Width = 191 - Height = 21 - CapSelectAll = '&Select all' - CapDeSelectAll = '&Deselect all' - NoFocusColor = clWindow - QuoteStyle = qsSingle - DropDownLines = 20 - TabOrder = 1 - end - object dxLayoutControl1Group_Root: TdxLayoutGroup - ShowCaption = False - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item1: TdxLayoutItem - AutoAligns = [aaVertical] - Caption = 'Colecci'#243'n:' - Control = cbColeccion - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item3: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Centro:' - Control = ccbCentro - ControlOptions.ShowBorder = False - end - end - end -end diff --git a/Source/Modulos/Stock/Cliente/uViewFiltrosStock.pas b/Source/Modulos/Stock/Cliente/uViewFiltrosStock.pas deleted file mode 100644 index c7f43ba..0000000 --- a/Source/Modulos/Stock/Cliente/uViewFiltrosStock.pas +++ /dev/null @@ -1,111 +0,0 @@ -unit uViewFiltrosStock; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, dxLayoutControl, cxControls, uViewControlGrid, - cxGraphics, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, - cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage, DB, cxDBData, - cxGridLevel, cxClasses, cxGridCustomView, cxGridCustomTableView, - cxGridTableView, cxGridDBTableView, cxGrid, cxCheckComboBox, StdCtrls, - Mask, JvExMask, JvToolEdit, JvCombobox; - -type - IViewFiltrosStock = interface - ['{ABC745C3-64F0-44E4-AF4B-118AE5060150}'] - procedure SetFocusedView (const Value : TcxGridDBTableView); - function GetFocusedView : TcxGridDBTableView; - property FocusedView : TcxGridDBTableView read GetFocusedView write SetFocusedView; - procedure Refresh; - end; - - TfrViewFiltrosStock = class(TFrame, IViewFiltrosStock) - dxLayoutControl1Group_Root: TdxLayoutGroup; - dxLayoutControl1: TdxLayoutControl; - cbColeccion: TcxComboBox; - dxLayoutControl1Item1: TdxLayoutItem; - dxLayoutControl1Item3: TdxLayoutItem; - ccbCentro: TJvCheckedComboBox; - private - FFocusedView : TcxGridDBTableView; - function GetFilterValueList(AColumnIndex: Integer): TStringList; - protected - procedure RellenarFiltros; - procedure SetFocusedView (const Value : TcxGridDBTableView); - function GetFocusedView : TcxGridDBTableView; - public - CentroColumnIndex : Integer; - ColeccionColumnIndex : Integer; - property FocusedView : TcxGridDBTableView read GetFocusedView write SetFocusedView; - procedure Refresh; - end; - - -implementation - -{$R *.dfm} - -{ TfrViewFiltrosStock } - -function TfrViewFiltrosStock.GetFilterValueList(AColumnIndex: Integer): TStringList; -var - AValueList : TcxDataFilterValueList; - i : Integer; -begin - Result := TStringList.Create; - - if AColumnIndex < 0 then - Exit; - - AValueList := TcxDataFilterValueList.Create(FFocusedView.DataController.Filter); - try - AValueList.Load(AColumnIndex); - for i := 0 to AValueList.Count - 1 do - Result.Add(AValueList[i].DisplayText); - finally - FreeAndNil(AValueList); - end; -end; - -function TfrViewFiltrosStock.GetFocusedView: TcxGridDBTableView; -begin - Result := FFocusedView; -end; - -procedure TfrViewFiltrosStock.Refresh; -begin - inherited; - RellenarFiltros; -end; - -procedure TfrViewFiltrosStock.RellenarFiltros; -begin - if ColeccionColumnIndex >= 0 then - with cbColeccion.Properties do - begin - Items.Clear; - Items.AddStrings(GetFilterValueList(ColeccionColumnIndex)); - Items.Delete(1); - Items.Strings[0] := 'Todos'; - cbColeccion.Text := 'Todos'; - end; - - if CentroColumnIndex >= 0 then - with ccbCentro do - begin - Items.Clear; - Items.AddStrings(GetFilterValueList(CentroColumnIndex)); - Items.Delete(1); - Items.Strings[0] := 'Todos'; - Checked[0] := True; - end; -end; - -procedure TfrViewFiltrosStock.SetFocusedView( - const Value: TcxGridDBTableView); -begin - FFocusedView := Value; -end; - -end.