From eabf73fec2ad024f6ca5b26065676c1b14e9d003 Mon Sep 17 00:00:00 2001 From: jdg Date: Sun, 12 Sep 2021 22:10:10 +0200 Subject: [PATCH] First commit 11/12/1999 --- CfgTurnos.cpp | 413 +++++++++++++++++++++++++++++++++++++++++++++ CfgTurnos.dfm | Bin 0 -> 13261 bytes CfgTurnos.h | 136 +++++++++++++++ Horarios.bpr | 109 ++++++++++++ Horarios.cpp | 22 +++ Horarios.res | Bin 0 -> 876 bytes README.md | 9 + datos/horario.PX | Bin 0 -> 2048 bytes datos/horario.XG0 | Bin 0 -> 2048 bytes datos/horario.YG0 | Bin 0 -> 2048 bytes datos/horario.db | Bin 0 -> 2048 bytes datos/personal.PX | Bin 0 -> 4096 bytes datos/personal.XG0 | Bin 0 -> 4096 bytes datos/personal.YG0 | Bin 0 -> 4096 bytes datos/personal.db | Bin 0 -> 4096 bytes datos/sectores.PX | Bin 0 -> 4096 bytes datos/sectores.db | Bin 0 -> 4096 bytes datos/turnos.PX | Bin 0 -> 4096 bytes datos/turnos.XG0 | Bin 0 -> 4096 bytes datos/turnos.YG0 | Bin 0 -> 4096 bytes datos/turnos.db | Bin 0 -> 4096 bytes horarios.ico | Bin 0 -> 766 bytes 22 files changed, 689 insertions(+) create mode 100644 CfgTurnos.cpp create mode 100644 CfgTurnos.dfm create mode 100644 CfgTurnos.h create mode 100644 Horarios.bpr create mode 100644 Horarios.cpp create mode 100644 Horarios.res create mode 100644 README.md create mode 100644 datos/horario.PX create mode 100644 datos/horario.XG0 create mode 100644 datos/horario.YG0 create mode 100644 datos/horario.db create mode 100644 datos/personal.PX create mode 100644 datos/personal.XG0 create mode 100644 datos/personal.YG0 create mode 100644 datos/personal.db create mode 100644 datos/sectores.PX create mode 100644 datos/sectores.db create mode 100644 datos/turnos.PX create mode 100644 datos/turnos.XG0 create mode 100644 datos/turnos.YG0 create mode 100644 datos/turnos.db create mode 100644 horarios.ico diff --git a/CfgTurnos.cpp b/CfgTurnos.cpp new file mode 100644 index 0000000..bd80fc9 --- /dev/null +++ b/CfgTurnos.cpp @@ -0,0 +1,413 @@ +//--------------------------------------------------------------------------- +#define BarraEstado2 StatusBar1->Panels->Items[1]->Text + +//--------------------------------------------------------------------------- +#include + +#include +#pragma hdrstop + +#include "CfgTurnos.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TTurnos *Turnos; +//--------------------------------------------------------------------------- +__fastcall TTurnos::TTurnos(TComponent* Owner) + : TForm(Owner) +{ + unsigned short year, month, day; + TDateTime::CurrentDate().DecodeDate( &year, &month, &day ); + Meses->ItemIndex = month-1; + if ( year>=1999 && year<=2001 ) + Anyos->ItemIndex = (1999-year); +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::TbTurnosBeforeOpen(TDataSet *DataSet) +{ + if ( access( (TbTurnos -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbTurnos -> FieldDefs -> Clear(); + + /********************\ + |* Datos Básicos *| + \********************/ + TbTurnos -> FieldDefs -> Add("idTurno", ftAutoInc, 0, false ); + TbTurnos -> FieldDefs -> Add("idSector", ftInteger, 0, false ); + TbTurnos -> FieldDefs -> Add("NTurno", ftString, 15, false ); + + TbTurnos -> FieldDefs -> Add("HTurnoP0", ftFloat, 0, false ); + TbTurnos -> FieldDefs -> Add("HTurnoP1", ftFloat, 0, false ); + TbTurnos -> FieldDefs -> Add("HTurnoP2", ftFloat, 0, false ); + + + + TbTurnos -> IndexDefs-> Clear(); + + TIndexOptions MyIndexOptions; + MyIndexOptions << ixPrimary << ixUnique; + TbTurnos->IndexDefs->Add("Primary", "idTurno;idSector", MyIndexOptions); + TbTurnos->IndexDefs->Add("IdxSector", "idSector", TIndexOptions() << ixCaseInsensitive ); + + // Creamos la base... + TbTurnos -> CreateTable(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::TbSectoresBeforeOpen(TDataSet *DataSet) +{ + if ( access( (TbSectores -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbSectores -> FieldDefs -> Clear(); + + /********************\ + |* Datos Básicos *| + \********************/ + TbSectores -> FieldDefs -> Add("idSector", ftAutoInc, 0, false ); + TbSectores -> FieldDefs -> Add("NSector", ftString, 15, false ); + + + TbSectores -> IndexDefs-> Clear(); + + TIndexOptions MyIndexOptions; + MyIndexOptions << ixPrimary << ixUnique; + TbSectores->IndexDefs->Add("Primary", "idSector", MyIndexOptions); + + // Creamos la base... + TbSectores -> CreateTable(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::TbPersonalBeforeOpen(TDataSet *DataSet) +{ + if ( access( (TbPersonal -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbPersonal -> FieldDefs -> Clear(); + + /********************\ + |* Datos Básicos *| + \********************/ + TbPersonal -> FieldDefs -> Add("idPersonal", ftAutoInc, 0, false ); + TbPersonal -> FieldDefs -> Add("idSector", ftInteger, 0, false ); + TbPersonal -> FieldDefs -> Add("Nombre", ftString, 15, false ); + TbPersonal -> FieldDefs -> Add("Apellidos", ftString, 30, false ); + TbPersonal -> FieldDefs -> Add("Tlfs", ftString, 30, false ); + + TbPersonal -> IndexDefs-> Clear(); + + TIndexOptions MyIndexOptions; + MyIndexOptions << ixPrimary << ixUnique; + TbPersonal->IndexDefs->Add("Primary", "idPersonal", MyIndexOptions); + TbPersonal->IndexDefs->Add("IdxSector", "idSector", TIndexOptions() << ixCaseInsensitive ); + + // Creamos la base... + TbPersonal -> CreateTable(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::TbHorariaBeforeOpen(TDataSet *DataSet) +{ + if ( access( (TbHoraria -> TableName).c_str(), 0 ) != 0 ) + { + // Usamos la propiedad FielDefs para definir + // las columnas que contendrá la tabla + TbHoraria -> FieldDefs -> Clear(); + + /********************\ + |* Datos Básicos *| + \********************/ + TbHoraria -> FieldDefs -> Add("idHorario", ftAutoInc, 0, false ); + TbHoraria -> FieldDefs -> Add("Mes", ftSmallint, 0, false ); + TbHoraria -> FieldDefs -> Add("Anyo", ftSmallint, 0, false ); + + TbHoraria -> FieldDefs -> Add("idSector", ftInteger, 0, false ); + TbHoraria -> FieldDefs -> Add("idPersonal", ftInteger, 0, false ); + + + for( int i=1; i<=31; i++ ) + TbHoraria -> FieldDefs -> Add(AnsiString("idTurno_Dia"+AnsiString( i )), ftInteger, 0, false ); + + TbHoraria -> IndexDefs-> Clear(); + + TIndexOptions MyIndexOptions; + MyIndexOptions << ixPrimary << ixUnique; + TbHoraria->IndexDefs->Add("Primary", "idHorario;Mes;Anyo", MyIndexOptions); + TbHoraria->IndexDefs->Add("IdxSector", "idSector", TIndexOptions() << ixCaseInsensitive ); + + // Creamos la base... + TbHoraria -> CreateTable(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::FormCreate(TObject *Sender) +{ + int i; + for ( i=0; i<96; i++ ) + { +// TSpeedButton *CfgTurnos[96]; + CfgTurnos[i] = new TShape(this); + + CfgTurnos[i]->Width = 9; + CfgTurnos[i]->Height = 16; + + CfgTurnos[i]->Top = 40 + ( i < 48 ? 0 : CfgTurnos[i]->Height + 5 ); + CfgTurnos[i]->Left = ( i < 48 ? i : i-48 )*(CfgTurnos[i]->Width - 1) + 24; + + CfgTurnos[i]->OnMouseDown = CfgTurnosMouseUp; + + Pizarra->InsertControl( CfgTurnos[i] ); + +// TLabel *LblTurnos[96]; + if ( i < 48 && (i%4)==0 ) + { + LblTurnos[i/4] = new TLabel(this); + + LblTurnos[i/4]->Top = 24 + ( i < 48 ? 0 : CfgTurnos[i]->Height + 5 ); + LblTurnos[i/4]->Left = ( i < 48 ? i : i-48 )*(CfgTurnos[i]->Width - 1) + 24 - ( (i/4)<9 ? 0 : 5 ); + + LblTurnos[i/4]->Caption = AnsiString( (i/4)+1 ); + + Pizarra->InsertControl( LblTurnos[i/4] ); + } + + } + + TbSectores->Active = true; + TbTurnos->Active = true; + TbPersonal->Active = true; + TbHoraria->Active = true; +/* + try { + DBLookupComboBox1->Text = TbSectores->FieldByName( "NSector" )->AsString; + }catch(...) + { + // do nothing... + } +*/ +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::FormDestroy(TObject *Sender) +{ + int i; + for ( i=0; i<96; i++ ) + delete CfgTurnos[i]; + + for ( i=0; i<12; i++ ) + delete LblTurnos[i]; +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::CfgTurnosMouseUp(TObject *Sender, + TMouseButton Button, TShiftState Shift, int X, int Y) +{ + int i; + for ( i=0; i<96; i++ ) + { + if ( Sender == CfgTurnos[i] ) + { + #define TurnoX TbTurnos->FieldByName( "HTurnoP" + AnsiString( i / 32 ) )->AsInteger + #define Mask ( 0x01 << ( i % 32 ) ) + #define TurnoX1 TbTurnos->FieldByName( "HTurnoP" + AnsiString( i / 32 ) )->AsFloat + TbTurnos->Edit(); + TurnoX1 = ( (TurnoX & ~Mask ) | ( !( TurnoX & Mask ) << ( i % 32 ) ) ); + TbTurnos->Post(); +// CfgTurnos[i]->Brush->Color = ( TurnoX & Mask ) ? clRed : clWhite; + break; + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TTurnos::DsTurnosDataChange(TObject *Sender, TField *Field) +{ + int i; + + if ( PageControl1->ActivePage == TabSheet2 ) + { + // Indicador de FichaActual / Num.Fichas + if ( TbTurnos -> RecNo > 0 && TbTurnos -> RecordCount > 0 ) + { + BarraEstado2 = Format( "C: %d / %d", OPENARRAY(TVarRec, (TbTurnos -> RecNo, TbTurnos -> RecordCount)) ); + for ( i=0; i<96; i++ ) + CfgTurnos[i]->Brush->Color = ( TurnoX & Mask ) ? clRed : clWhite; + } else { + BarraEstado2 = Format( "C: ¿Nuevo? / %d", OPENARRAY(TVarRec, (TbTurnos -> RecordCount) ) ); + } + } + +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::DsSectoresDataChange(TObject *Sender, + TField *Field) +{ + // Indicador de FichaActual / Num.Fichas + if ( TbSectores -> RecNo > 0 && TbSectores -> RecordCount > 0 ) + { + BarraEstado2 = Format( "C: %d / %d", OPENARRAY(TVarRec, (TbSectores -> RecNo, TbSectores -> RecordCount)) ); + } else { + BarraEstado2 = Format( "C: ¿Nuevo? / %d", OPENARRAY(TVarRec, (TbSectores -> RecordCount) ) ); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::TbTurnosBeforeInsert(TDataSet *DataSet) +{ + if ( !( TbSectores -> RecNo > 0 && TbSectores -> RecordCount > 0 ) ) + { +// MessageBox( 0, "¿ No cree que debería crear,\no seleccionar una factura nueva,\nantes de agregar datos de compra?.", "¡ Atención !", MB_OK ); + Abort(); + } else { + for (int i=0; i<96; i++) + CfgTurnos[i]->Brush->Color = clWhite; + } +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::DBGrid2DrawColumnCell(TObject *Sender, + const TRect &Rect, int DataCol, TColumn *Column, + TGridDrawState State) +{ + // Precisa seguimiento ¿? + if ( Column -> ID == 2 ) + { + int i, AnchoT, AltoT; + TRect RectT; + + + AnchoT = ((Rect.Right-Rect.Left) / 48); + #define DESPLAZAM_CENTRO ((Rect.Right-Rect.Left)-(AnchoT*48))/2 + + RectT = Rect; + RectT.Top++; + RectT.Left += DESPLAZAM_CENTRO; + RectT.Right+= DESPLAZAM_CENTRO; + + + RectT.Right = RectT.Left; + AltoT = (Rect.Bottom-Rect.Top-1)/2; + RectT.Bottom -= AltoT; + + DBGrid2 -> Canvas -> Pen -> Color = clBlack; + + if ( AnchoT > 0 ) + { + for ( i=0; i<96; i++ ) + { + if ( i == 48 ) { RectT.Top = RectT.Bottom; RectT.Bottom = Rect.Bottom; RectT.Left = Rect.Left+DESPLAZAM_CENTRO;RectT.Right = Rect.Left+DESPLAZAM_CENTRO; } + RectT.Left = RectT.Right; + RectT.Right += AnchoT; + DBGrid2 -> Canvas -> Brush -> Color = ( TurnoX & Mask ) ? clRed : clWhite; + DBGrid2 -> Canvas -> FillRect( RectT ); + // Dibujamos las marcas horarias... + if ( (i%4)==0 ) + { + DBGrid2 -> Canvas -> MoveTo( RectT.Left, RectT.Top+1 ); + DBGrid2 -> Canvas -> LineTo( RectT.Left, RectT.Bottom ); + } + if ( (i%24)==0 && i!=0 && i!=48 ) + { + DBGrid2 -> Canvas -> MoveTo( RectT.Left+1, RectT.Top+1 ); + DBGrid2 -> Canvas -> LineTo( RectT.Left+1, RectT.Bottom ); + } + } + DBGrid2 -> Canvas -> MoveTo( Rect.Left+DESPLAZAM_CENTRO, RectT.Top ); + DBGrid2 -> Canvas -> LineTo( RectT.Right,RectT.Top ); + + DBGrid2 -> Canvas -> MoveTo( Rect.Left+DESPLAZAM_CENTRO, Rect.Top+1 ); + DBGrid2 -> Canvas -> LineTo( RectT.Right,Rect.Top+1 ); + DBGrid2 -> Canvas -> LineTo( RectT.Right,RectT.Bottom ); + DBGrid2 -> Canvas -> LineTo( Rect.Left+DESPLAZAM_CENTRO,RectT.Bottom ); + DBGrid2 -> Canvas -> LineTo( Rect.Left+DESPLAZAM_CENTRO,Rect.Top+1 ); + + } + + } + + +// DBGrid1 -> Canvas -> StretchDraw( Rect, BtmOK ); + +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::FormResize(TObject *Sender) +{ + int Separacion; + + Separacion = ((Pizarra->Width - (47*(Shape1->Width - 1) + Shape1->Left))/12)-1; + + + + for ( int i = 0; i < 96; i++ ) + { + CfgTurnos[i]->Width = Shape1->Width; + CfgTurnos[i]->Height = Shape1->Height; + + CfgTurnos[i]->Top = (i<48?Shape1->Top:Shape2->Top);//Shape1->Top + ( i < 48 ? 0 : CfgTurnos[i]->Height + 5 ); + CfgTurnos[i]->Left = ( i < 48 ? i : i-48 )*(CfgTurnos[i]->Width - 1) + Shape1->Left + (((i%48)/4)*Separacion); + + if ( i < 48 && (i%4)==0 ) + { + LblTurnos[i/4]->Top = Label3->Top; + LblTurnos[i/4]->Left = i *(CfgTurnos[i]->Width - 1) + Label3->Left - ( (i/4)<9 ? 0 : ((Label3->Width*5)/CfgTurnos[i]->Width) ) + (((i%48)/4)*Separacion); + } + } +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::TbPersonalBeforeInsert(TDataSet *DataSet) +{ + if ( !( TbSectores -> RecNo > 0 && TbSectores -> RecordCount > 0 ) ) + { +// MessageBox( 0, "¿ No cree que debería crear,\no seleccionar una factura nueva,\nantes de agregar datos de compra?.", "¡ Atención !", MB_OK ); + Abort(); + } +} +//--------------------------------------------------------------------------- + + +void __fastcall TTurnos::PageControl1Change(TObject *Sender) +{ + TWinControl *HookP; + + // Reasignamos los marcadores de hora... + if ( PageControl1->ActivePage == TabSheet1 || + PageControl1->ActivePage == TabSheet2 ) + { + HookP = PageControl1->ActivePage == TabSheet1 ? Pizarra2 : Pizarra; + for ( int i = 0; i < 96; i++ ) + { + CfgTurnos[i]->Parent = HookP; + if ( i < 48 && (i%4)==0 ) + LblTurnos[i/4]->Parent = HookP; + } + + for ( int i=0; i<96; i++ ) + CfgTurnos[i]->Brush->Color = clWhite; + } +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::TbHorariaCalcFields(TDataSet *DataSet) +{ + TbHoraria->FieldByName("Prsnl_CltNombApll")->AsString = + TbHoraria->FieldByName("Prsnl_Nombre")->AsString + + TbHoraria->FieldByName("Prsnl_Apellidos")->AsString; +} +//--------------------------------------------------------------------------- + +void __fastcall TTurnos::DBGrid4DrawColumnCell(TObject *Sender, + const TRect &Rect, int DataCol, TColumn *Column, + TGridDrawState State) +{ + if ( State.Contains(gdFixed) && Column->ID > 1 ) + { + Column->Title->Caption = "Día "+Column->ID; + } +} +//--------------------------------------------------------------------------- + diff --git a/CfgTurnos.dfm b/CfgTurnos.dfm new file mode 100644 index 0000000000000000000000000000000000000000..cce1218d2a424f070f0b2cfbe4fa8d640f345ec4 GIT binary patch literal 13261 zcmdT~&2QVt6{jSd6cstP^05tCpmhs0Z4Y(rk@MlE3#=?Bjl2G8#O$I#fh;ACZ6Y+O zl9WFJ6mSm3?xKf9F9m`gdg`_39(u?hu)qQf^jM(B-itj1DAs+P4{}B#rBRyzTO}5$ znfKnzy!YdKZ{F~trdihGM?1S6ZF%9ZO--}*9xNM{H3H5PUeAelOf#;?YPh8^3rFUuNyO7L%SaRI(( zw0}a&ThR7>_*;a(ci=B+Cm%vhZ{_cEO@sg1`8mD7H{5D3U%rHE(s4olYZn*E9sI$+ zq$&A&&7V?3`e==h$mg71o@wofZ zxLmxkeod3*&-aJtll8xP@j{;Oi)8*;|HZ36%KaBFK7$`l$wZib zo@-iF)ZfDN#w6l|uX9bSfRxf3_^W{I`STg=Tf%S`mv=p<9b!AiyP< zM|44}S)JI92N5`pT6(ua+)bHyo64U{%-x)FcT>Kq@7X@cyv)09mNj-;Mw)i1;~w=r zOlYc_R=4)-1Kb9O0^X@E+>67Me=s~s(KUr{E9dZZPQGP%SeT-q@J(=eV)DO;6?DHcIXC?ro+TxnRKzM zf=8|90nj!gN{1tHC0uvaJ@=U% zhBh6y@;4g5%52~lB|h-mOnrv!JxU^)s4KmDyc7616JG-9okP2ib@JV$Yq~+!bcHFZ z$|Zvt!KA!gd@sJK~rUO`~{!mjoN06kNC5nDYQJ3_ym3SKHxQ&OK75{P8_=a zK~!R`y72&aL+I9Lx9#v5Tw2}G_4Ju-`wV{kY~Z`(;=x649RyJv=(P@pECU|_pKk2- z;z4p_?gYoI&D?N%^j2O-%RdX)LOvj7;tN@ww2%s2$jr*x+S>3sNTWW3mY0{wccMMR zT6beec?^1?4yp2cic&u6Pts9S)q@V6;%{dPoFTF{)_)qhjzKSyzi2VQr~aby-O{id zt0jpLd#cQhhEOt3W6v|LGtCY)Qwj)1)%&M?+jqdHn#5s|0UCQ@%J<*U7^+Zcb)Dul9QBP${G?gvURJKG@*%D1umBl;FMLRtl7vy%GRR3U-!uGyC%qtHBnKe-2D(KUNqbZ2 z21}}Gt|v{el1eYwZOs&OYDWEE>gBOaU_%nV90uJk}57q1axHX6asK9HCrs_J>4@g9t zP=+|bAtz!%DkG`x$Fwjv(}6O7c^*<;@Xq*D9Q`t%B6odK%{)_U`Fd$k zy+q`A0Y}4{`3N*~$;#ZHm`{*aI5-wmR)=yPJPqu4=2~`akhN09FH^;TJS09%qzx`S zeS~GvS9r!E5a1WO_2 zr@#c%bNxt=-pr6^T3uG)7lC&*Z540_N1C?Rqdv~aD6+;;Ut_usJH*TkJBqmq92jN& zHHa)nHpF&6PN9(;#Ehj-f~|mxOc+dO2;EZ2T$K>15;j!{S5*mbsS@5+CA_0bcvqEh zZ5*Lga9viWTv4VRYaD6xvDT3&$C^i?9BUtma;$+Q%CQ!bD94&eqExmKQnnFNwh>ac z5mL4hQnnFNwh>ac5mL4hQnnFNwoy~rM$LR1<%HY$G%Ap2yTTLbE2)>i2cG<1;;hF< z-8UIF7aWpAAJTVc(x~}!n#|oSX>%6a0Fg)rJ1rLf(nSbowpskrw96I`ON6nWGQye# zmL!;s5YMH=iE;$$ndG+yb7C=wh;F3Re1{}(q>*lzD~rfkrYGTRS8NkfD7!GYVrW3S<|n!TAzud_)EP5(w3J?NCu0?~vO%ny;jwnbzI z2~(}(>qF~kXRq}ME2-~4P0Aw!58kGC1bd9W3rNf8KdcGla4I2|HM3VS)A~+UyrJct Kl{CrKwEqD9O2yp( literal 0 HcmV?d00001 diff --git a/CfgTurnos.h b/CfgTurnos.h new file mode 100644 index 0000000..cce2b43 --- /dev/null +++ b/CfgTurnos.h @@ -0,0 +1,136 @@ +//--------------------------------------------------------------------------- +#ifndef CfgTurnosH +#define CfgTurnosH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TTurnos : public TForm +{ +__published: // IDE-managed Components + TTable *TbTurnos; + TStatusBar *StatusBar1; + TPageControl *PageControl1; + TTabSheet *TabSheet1; + TTabSheet *TabSheet2; + TPanel *Panel1; + TTable *TbSectores; + TSplitter *Splitter1; + TPanel *Panel2; + TDBGrid *DBGrid1; + TPanel *Pizarra; + TDBGrid *DBGrid2; + TDataSource *DsSectores; + TDataSource *DsTurnos; + TShape *Shape1; + TLabel *Label1; + TLabel *Label2; + TShape *Shape2; + TLabel *Label3; + TTabSheet *TabSheet3; + TPanel *Panel3; + TDBGrid *DBGrid3; + TTable *TbPersonal; + TDataSource *DsPersonal; + TLabel *Label4; + TDBLookupComboBox *DBLookupComboBox1; + TPanel *Panel4; + TLabel *Label5; + TDBLookupComboBox *DBLookupComboBox2; + TDBGrid *DBGrid4; + TPanel *Pizarra2; + TShape *Shape3; + TLabel *Label6; + TLabel *Label7; + TShape *Shape4; + TLabel *Label8; + TTable *TbHoraria; + TDataSource *DsHoraria; + TComboBox *Meses; + TComboBox *Anyos; + TBitBtn *BitBtn1; + TAutoIncField *TbHorariaidHorario; + TSmallintField *TbHorariaMes; + TSmallintField *TbHorariaAnyo; + TIntegerField *TbHorariaidSector; + TIntegerField *TbHorariaidPersonal; + TIntegerField *TbHorariaidTurno_Dia1; + TIntegerField *TbHorariaidTurno_Dia2; + TIntegerField *TbHorariaidTurno_Dia3; + TIntegerField *TbHorariaidTurno_Dia4; + TIntegerField *TbHorariaidTurno_Dia5; + TIntegerField *TbHorariaidTurno_Dia6; + TIntegerField *TbHorariaidTurno_Dia7; + TIntegerField *TbHorariaidTurno_Dia8; + TIntegerField *TbHorariaidTurno_Dia9; + TIntegerField *TbHorariaidTurno_Dia10; + TIntegerField *TbHorariaidTurno_Dia11; + TIntegerField *TbHorariaidTurno_Dia12; + TIntegerField *TbHorariaidTurno_Dia13; + TIntegerField *TbHorariaidTurno_Dia14; + TIntegerField *TbHorariaidTurno_Dia15; + TIntegerField *TbHorariaidTurno_Dia16; + TIntegerField *TbHorariaidTurno_Dia17; + TIntegerField *TbHorariaidTurno_Dia18; + TIntegerField *TbHorariaidTurno_Dia19; + TIntegerField *TbHorariaidTurno_Dia20; + TIntegerField *TbHorariaidTurno_Dia21; + TIntegerField *TbHorariaidTurno_Dia22; + TIntegerField *TbHorariaidTurno_Dia23; + TIntegerField *TbHorariaidTurno_Dia24; + TIntegerField *TbHorariaidTurno_Dia25; + TIntegerField *TbHorariaidTurno_Dia26; + TIntegerField *TbHorariaidTurno_Dia27; + TIntegerField *TbHorariaidTurno_Dia28; + TIntegerField *TbHorariaidTurno_Dia29; + TIntegerField *TbHorariaidTurno_Dia30; + TIntegerField *TbHorariaidTurno_Dia31; + TStringField *TbHorariaPrsnl_Nombre; + TStringField *TbHorariaPrsnl_Apellidos; + TStringField *TbHorariaPrsnl_CltNombApll; + void __fastcall TbTurnosBeforeOpen(TDataSet *DataSet); + + void __fastcall TbSectoresBeforeOpen(TDataSet *DataSet); + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormDestroy(TObject *Sender); + + void __fastcall DsTurnosDataChange(TObject *Sender, TField *Field); + void __fastcall DsSectoresDataChange(TObject *Sender, TField *Field); + void __fastcall TbTurnosBeforeInsert(TDataSet *DataSet); + void __fastcall DBGrid2DrawColumnCell(TObject *Sender, + const TRect &Rect, int DataCol, TColumn *Column, + TGridDrawState State); + void __fastcall FormResize(TObject *Sender); + void __fastcall TbPersonalBeforeOpen(TDataSet *DataSet); + void __fastcall TbPersonalBeforeInsert(TDataSet *DataSet); + + void __fastcall PageControl1Change(TObject *Sender); + void __fastcall TbHorariaBeforeOpen(TDataSet *DataSet); + void __fastcall TbHorariaCalcFields(TDataSet *DataSet); + void __fastcall DBGrid4DrawColumnCell(TObject *Sender, + const TRect &Rect, int DataCol, TColumn *Column, + TGridDrawState State); +private: // User declarations + TShape *CfgTurnos[96]; + TLabel *LblTurnos[12]; + void __fastcall CfgTurnosMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); + + +public: // User declarations + __fastcall TTurnos(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TTurnos *Turnos; +//--------------------------------------------------------------------------- +#endif diff --git a/Horarios.bpr b/Horarios.bpr new file mode 100644 index 0000000..325fcce --- /dev/null +++ b/Horarios.bpr @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Excluded Packages] +C:\Mis documentos\Fuentes de Programacion\C++ Builder\VCLs\Bpl\QSElFrm.bpl=d:\program files\borland\cbuilder5\Projects\Bpl\qselfrm +$(BCB)\Projects\Bpl\Dialup.bpl=RAS Tools + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/Horarios.cpp b/Horarios.cpp new file mode 100644 index 0000000..85a4141 --- /dev/null +++ b/Horarios.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Horarios.res"); +USEFORM("CfgTurnos.cpp", Turnos); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->Title = "Gestor de Horarios"; + Application->CreateForm(__classid(TTurnos), &Turnos); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/Horarios.res b/Horarios.res new file mode 100644 index 0000000000000000000000000000000000000000..44616473301f722acf415d5b52889f4fd8794b2c GIT binary patch literal 876 zcmcIjF^=jcV_YGFDec)Ua^~uZKdDnI4`gEblzxhC# ze_7wwGy1)AX}wPCAARY6QePa~KKec9Nq%>`e(XnynJ?t8KMgR8`&T@EmOfn+ERZpa u{*cdR#@tJrV;yZLuiWU36j|UCJAB}ae8)F+KzuK>EQ6{l7<1??GPnYS&^2fP literal 0 HcmV?d00001 diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe33821 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +#Horarios + + +*11/12/1999* + +ToDo: wwtcf? + + +![screenshot](/Horarios.png "Screenshot") diff --git a/datos/horario.PX b/datos/horario.PX new file mode 100644 index 0000000000000000000000000000000000000000..f5bdb1f7bc72343d50918815c84b39f3487aa564 GIT binary patch literal 2048 zcmd;MVBlb6Vn6}{NNh$124*NXmVrSW$efYD-#iJ38Mu*@ftWBeHbTV3SeTiZndSgh lX5<$o7G>t^1w^3f80C(Jz-S1JhQMeDjE2By2nK7I#ckqyJo%e90WkwNNQ*o_ zl12zqi;;nWQGtP*ksHWhV0a)EV!_6+mEi=#6Bb6s{U9MQU||tsVP*osD?rnfz4)7T zfY=O(t$^4bh%@qw5{okP^&;F2V45hQGgE?7lS}f87&22lASN^TrWP|e=2hl1IOSw3 z_?6}YeaghZ3?x|@9Q}elg99A>7(7!dp!z7Wd{pmf2#kinXb6mkz-R~zt`GnKWVkGv literal 0 HcmV?d00001 diff --git a/datos/horario.YG0 b/datos/horario.YG0 new file mode 100644 index 0000000000000000000000000000000000000000..de6b1f3aa3accdf232a761bf9995f0a162cf0d05 GIT binary patch literal 2048 zcmWe)VBlb9Vn71?NNh$11{NqcmVu!G$b99--~0%O8Mu*@ftWBeHbcZ&Sj1SEnV6a0 o0o7*Y7bO;D=Icee8=z?#<&K8HXb6mkz-S1JhQMeD3`7V306_Q)H2?qr literal 0 HcmV?d00001 diff --git a/datos/horario.db b/datos/horario.db new file mode 100644 index 0000000000000000000000000000000000000000..9722717c65c2b5889bc833d6edad1774e0e12ef7 GIT binary patch literal 2048 zcmeH`J4_T&6o&uVS&?OdiwKK6WCf+5G2T1KqcNF85-4~iO9_}^XN;SWon#h^Ev%*# zYGQ2Yh}3|!(VE2CLJJETN-7HcN1J=B`dr9)(jc*G}bF%Z;~5J%07F7HB&dJ9u`OvBPsa%-Uhj4)b&0LPQG_ zEmX8{F~Y?N7b9GZa52Kg2p1zs6C-8qx;19!2 B?IZvI literal 0 HcmV?d00001 diff --git a/datos/personal.PX b/datos/personal.PX new file mode 100644 index 0000000000000000000000000000000000000000..34444c3244c79d5ea8ce4cd1affc58bd52ec921d GIT binary patch literal 4096 zcmd;LVBlb6Vq{=oV1z<$AR7jNVjw9Hh-F|f1yW0%e`;C;#0=ap39u{!12dFf3!%kW zcJK)_7o-*y=jSEn=mkVTrAMjJ5Eu=C(GVC7fzc2c4S~TD0u8|Gzk#uV6-bYQ(GVC7 Sfzc2c4S~@R7!8489|8b_T@NP! literal 0 HcmV?d00001 diff --git a/datos/personal.XG0 b/datos/personal.XG0 new file mode 100644 index 0000000000000000000000000000000000000000..0a5cc1c1bf0ad88dc8fd54efac491e3b7d079a67 GIT binary patch literal 4096 zcmd;LVBp|jVr5`pV1z;*1_maZYoD5OUVmx=3Nte>F);jR_#X=-UtTtyaqm;pBp_zs zW&}#g^8*P80C7P;2*_Ym07`=uFeID|vS49Y$gqLo2@50Ra*zrzU||tsVP^WlA<*p3 zDbO4M#L+-pkXlrnpO=`U7vXLIQ%M1xnG&3uT#{eJkeLzyHJQOFCtJahQMeDjE2By2#kinXb23w5C8xxe>N8Y literal 0 HcmV?d00001 diff --git a/datos/personal.YG0 b/datos/personal.YG0 new file mode 100644 index 0000000000000000000000000000000000000000..e30e2da68b97bea8d20034da535a31df489764de GIT binary patch literal 4096 zcmd;MVBlb9Vq{=oV1zC!DtAK ThQMeDjE2By2#kinunqwLz;_PW literal 0 HcmV?d00001 diff --git a/datos/personal.db b/datos/personal.db new file mode 100644 index 0000000000000000000000000000000000000000..58e4b3093b16cbfe07ec6e6639b798f5b94be49b GIT binary patch literal 4096 zcmWG$VBlb2Vr5`pV1z<0AUo&jr=~RxpPGP7R-iD$e}@0DK=#$k3}@bcYB~hO4BS9r z26=uU0RbQ*KtK&7t^kwF zi2ngGyO2OL9}r6baY1TPaeiK6j$TRB0bkesw)pc9!Gm>F1rK6msB_6!bi^rOh)QO%!WUzy z*d5bcoSIycUzA#`7Z3qeHcE|#z-S1JhQMeDjE2By2n?1GXaH9K4U7#;KzbC6hQMeD SjE2By2#kinXb24Z5C8xgnhpH` literal 0 HcmV?d00001 diff --git a/datos/sectores.db b/datos/sectores.db new file mode 100644 index 0000000000000000000000000000000000000000..7042b4cb0799eee6dbedc4b4d971c42f4a543194 GIT binary patch literal 4096 zcmWe;VBlb2Vq#!mV1z$cs1QcR&PRva#N-Ty6jnbnbFd71*Aut*OqaiRF0>dK&0Jcsj6951J literal 0 HcmV?d00001 diff --git a/datos/turnos.PX b/datos/turnos.PX new file mode 100644 index 0000000000000000000000000000000000000000..5fce5674c1bf1c9e02e70ccd372c8b8f1b6a882a GIT binary patch literal 4096 zcmd;MVBlb6Vq{=oV1z<8AR7jNVoXqWECa)9Aah#7-=;}G%)kxOg9O;2?DY^@jD>|I zYI;m_Mt)IZQD%OzUO)tr;!);k2#kinXb6mkz-S1JhQPpwKm)M)2V=$t4j?@WMnhmU T1V%$(Gz3ONU^E1VbqD|e=Isy@ literal 0 HcmV?d00001 diff --git a/datos/turnos.XG0 b/datos/turnos.XG0 new file mode 100644 index 0000000000000000000000000000000000000000..c115f27fe9ded567ea9667c9a5d3b12d75448932 GIT binary patch literal 4096 zcmd;MVBp|j;$UE4V1z<;1_q{{yuVE`Eq|MU!YmBT3=IDn{>K7I@ut_W%KkPz0%8Vk zMxdlTKahX`Rw%6i6lYWbN`n|1L8O!P6y(Q{G!C7%=}`#2zLXx2J#u1DZ#19CHX}RnJFQqMS1x^8YynI{F2B1_wC$F?gm_K$Vbh?WoSt5Eu=C(GVC7fzc2c+#!&}&;YEn;TXnZ x28+OWEGRry6doH2j~#`_3Fk2ZSr80rI*fwR5Eu=C(GVC7fzc2c4S@j*0RSO+MZW+5 literal 0 HcmV?d00001 diff --git a/datos/turnos.YG0 b/datos/turnos.YG0 new file mode 100644 index 0000000000000000000000000000000000000000..d23f1204088bb59b009ff587264899dfaae61e5a GIT binary patch literal 4096 zcmWe)VBlb9Vq{=oV1z;rAR7jNV$4u>ECWLska?ouZ_^Bb5S@kND;8LpSgEm5V^l~Kt3#rNkcc4AVR4Fymj+yDkp0q%i1uwB$OJzw0L%5B&udrJ9S`amxfDW6MiZSEI!id*l?W=hPEO#&?v z#KaDAl0q(65s9awsYE2+(+u*kbU->F9gq%42mXZvQC7m|UmzX$F_5~-%}^75-UO?L zt!+ph0*l&idbWL{+GumZs`hJ%$O*7?&@Nc1qnlX>Us$(6ssJpuM4eH4%VaVOMCycb znF(`_Y#7I!L+S#4$zR#$6YA<58wo(Bjz5nwOYZI>S0~w>Cc1`dY>;zatNYG{C3rmD zA+t(@C}kQ BnXv!> literal 0 HcmV?d00001 diff --git a/horarios.ico b/horarios.ico new file mode 100644 index 0000000000000000000000000000000000000000..1aca9c0bf1e655242a175509224c037d3402f1c0 GIT binary patch literal 766 zcmcIhu?>ST5Ih1>=)g^sE|eJ~Be|nB73rv5WfcZM${JY#DbnX`BH2bXk;2)3=l7xK z^#(Gorm4vVUI*X=;L2ziH-@|SptlVJaKo5I$UI^kN2)W#Z-}@PgUekx`ZF?>0P5~x z7U`h+*5T;6?Qo9mo;jNm(Sw)Ge43`G9^Mq$%?Hx@m0tG~{Mp*HU+el0zRZu*7t65+ te`cQ4x9ji2JQPab$ag*+P{#ACe}7D0E+PZutdi{zIcry@z$N;fd;m=uCrtnV literal 0 HcmV?d00001