unit AsignarTrimestre;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
  cxDropDownEdit, StdCtrls, RdxBotones, RdxBarras, ExtCtrls,
  RdxPaneles, TablaTrimestres;

type
  TfAsignarTrimestre = class(TForm)
    Titulo: TRdxBarraSuperior;
    Label2: TLabel;
    RdxPanel1: TRdxPanel;
    brDoble: TRdxBarraInferior;
    bAceptar: TRdxBoton;
    bCancelar: TRdxBoton;
    eTrimestre: TLabel;
    cbxTrimestres: TcxComboBox;
    imgSombra: TImage;
    procedure bAceptarClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    FListaTrimestres : TListaTrimestres;
    FCodigoTrimestre: String;
  public
    property CodigoTrimestre : String read FCodigoTrimestre;
  end;

var
  fAsignarTrimestre: TfAsignarTrimestre;

implementation

{$R *.dfm}

Uses
  Configuracion, Entidades;

procedure TfAsignarTrimestre.bAceptarClick(Sender: TObject);
begin
  FCodigoTrimestre := FListaTrimestres.getCodItem(cbxTrimestres.ItemIndex);
end;

procedure TfAsignarTrimestre.FormCreate(Sender: TObject);
begin
  ConfigurarFrame(Self, entInformes);
  FListaTrimestres := TListaTrimestres.Create(tlcTriAbiertos);
  cbxTrimestres.ItemIndex := FListaTrimestres.cargarLista(cbxTrimestres.Properties.Items);
end;

procedure TfAsignarTrimestre.FormDestroy(Sender: TObject);
begin
  FListaTrimestres.Free;
  FListaTrimestres := Nil;
end;

end.
