Skip to main content
Skip table of contents

TFormArtDates

TFormArtDates

Klasse zum Anzeigen des Terminraster-Formulars.

Eigenschaften

EigenschaftBeschreibung

MasterDataSet:O

DataSet Objekt (DAB010)

Beispiel

CODE
|oForm, oPnlLeft, oPnlRight, oPnlBottom, oLblInfo, oDBGrid, oDataSource,
 oDAB010, oFormObject,
 oBtnDetach, oBtnArtDates, oBtnArtStock, oBtnArtConsumpt, oBtnStoreFile,
 oBtnArtCustArr, oBtnSuppBackOrd, oBtnProdArr |

//******************************************************************************
// Fenster von Klasse erzeugen und anzeigen
//******************************************************************************
function CreateForm( cClassName )

  if not Empty(oFormObject) then
     DestroyObject(oFormObject),
  endif,

  oFormObject := CreateObject(cClassName,'Fenster',oForm,oPnlLeft),
  oFormObject.Align := alclient,
  oFormObject.BorderStyle := bsnone,
  oFormObject.MasterDataSet := oDAB010,

  Show(oFormObject),
end,

//******************************************************************************
// Fenster lösen
//******************************************************************************
function BtnDetachWindowClick( Sender )
  if not Empty(oFormObject) then
     oFormObject.Align := alNone,
     oFormObject.BorderStyle := bsSizeToolWin,
  endif,
end,

//******************************************************************************
// Fenster erzeugen
//******************************************************************************
function BtnCreateClick( Sender )
  case Sender.Tag
    of 1 :: CreateForm('TFormArtStock'),         // Lagerplatz-Bestände
    of 2 :: CreateForm('TFormArtConsumpt'),      // Verbräuche
    of 3 :: CreateForm('TFormStoreFile'),        // Lagerkartei
    of 4 :: CreateForm('TFormArtCustArr'),       // Kundenrückstände
    of 5 :: CreateForm('TFormSuppBackOrd'),      // Zuliefererrückstände
    of 6 :: CreateForm('TFormProdArr'),          // Produktionsrückstände
    otherwise CreateForm('TFormArtDates'),       // Terminraster
  endcase,
  oLblInfo.Caption := Sender.Caption,
end,

//******************************************************************************
// Bei Formularstart
//******************************************************************************
function MainFormShow( Sender )
  BtnCreateClick( oBtnArtDates ),
end,

//******************************************************************************
//******************************************************************************
// Formular
//******************************************************************************
//******************************************************************************
StartSeq,

  oForm           := CreateObject('TFormEx','MainForm'),
  oPnlLeft        := CreateObject('TPanel','PnlLeft',oForm, oForm),
  oPnlRight       := CreateObject('TPanel','PnlRight',oForm, oForm),
  oPnlBottom      := CreateObject('TPanel','PnlBottom',oForm, oForm),
  oBtnDetach      := CreateObject('TBeBitBtn','BtnDetach',oForm,oPnlRight),
  oLblInfo        := CreateObject('TLabel','LblInfo',oForm,oPnlRight),
  oDAB010         := CreateObject('TBeRightsTable','Table',oForm,oForm),
  oDBGrid         := CreateObject('TBeAltGrid','DBGrid',oForm,oPnlBottom),
  oDataSource     := CreateObject('TDataSourceEx','DataSource',oForm,oForm),

  oBtnArtDates    := CreateObject('TBeBitBtn','oBtnArtDates',oForm,oPnlRight),
  oBtnArtStock    := CreateObject('TBeBitBtn','oBtnArtStock',oForm,oPnlRight),
  oBtnArtConsumpt := CreateObject('TBeBitBtn','BtnArtConsumpt',oForm,oPnlRight),
  oBtnStoreFile   := CreateObject('TBeBitBtn','BtnStoreFile',oForm,oPnlRight),
  oBtnArtCustArr  := CreateObject('TBeBitBtn','BtnArtCustArr',oForm,oPnlRight),
  oBtnSuppBackOrd := CreateObject('TBeBitBtn','BtnSuppBackOrd',oForm,oPnlRight),
  oBtnProdArr     := CreateObject('TBeBitBtn','BtnProdArr',oForm,oPnlRight),

  // Form
  oForm.Width    := 800,
  oForm.Height   := 800,
  oForm.Position := poMainFormCenter,
  assignevent(oForm, 'OnShow', 'MainFormShow'),

  // Panel
  oPnlLeft.Align        := alClient,
  oPnlLeft.BevelOuter   := bvNone,
  oPnlLeft.Caption      := '',

  // Panel
  oPnlRight.Width       := 200,
  oPnlRight.Align       := alRight,
  oPnlRight.BevelOuter  := bvNone,
  oPnlRight.Caption     := '',

  // Panel
  oPnlBottom.Height     := 150,
  oPnlBottom.Align      := alBottom,
  oPnlBottom.BevelOuter := bvNone,
  oPnlBottom.Caption    := '',

  // DAB010
  oDAB010.Workarea := waDAB020,
  oDAB010.Active   := true,

  // Datasource
  oDataSource.DataSet := oDAB010,

  // Grid
  oDBGrid.Align      := alClient,
  oDBGrid.DataSource := oDataSource,

  // Info Label
  oLblInfo.Top        := 10,
  oLblInfo.Left       := 5,
  oLblInfo.Height     := 15,
  oLblInfo.Caption    := '',
  oLblInfo.Font.Size  := 10,
  oLblInfo.Font.Style := 1,

  // Button
  oBtnArtDates.Top     := 35,
  oBtnArtDates.Left    := 5,
  oBtnArtDates.Width   := 190,
  oBtnArtDates.Tag     := 0,
  oBtnArtDates.Caption := 'Terminraster',
  oBtnArtDates.ImageIndex.IndexNormal := 449,
  assignevent(oBtnArtDates, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnArtStock.Top     := 65,
  oBtnArtStock.Left    := 5,
  oBtnArtStock.Width   := 190,
  oBtnArtStock.Tag     := 1,
  oBtnArtStock.Caption := 'Lagerplatz-Bestände',
  oBtnArtStock.ImageIndex.IndexNormal := 15,
  assignevent(oBtnArtStock, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnArtConsumpt.Top     := 95,
  oBtnArtConsumpt.Left    := 5,
  oBtnArtConsumpt.Width   := 190,
  oBtnArtConsumpt.Tag     := 2,
  oBtnArtConsumpt.Caption := 'Verbräuche',
  oBtnArtConsumpt.ImageIndex.IndexNormal := 186,
  assignevent(oBtnArtConsumpt, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnStoreFile.Top     := 125,
  oBtnStoreFile.Left    := 5,
  oBtnStoreFile.Width   := 190,
  oBtnStoreFile.Tag     := 3,
  oBtnStoreFile.Caption := 'Lagerkartei',
  oBtnStoreFile.ImageIndex.IndexNormal := 19,
  assignevent(oBtnStoreFile, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnArtCustArr.Top     := 155,
  oBtnArtCustArr.Left    := 5,
  oBtnArtCustArr.Width   := 190,
  oBtnArtCustArr.Tag     := 4,
  oBtnArtCustArr.Caption := 'Kundenrückstände',
  oBtnArtCustArr.ImageIndex.IndexNormal := 441,
  assignevent(oBtnArtCustArr, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnSuppBackOrd.Top     := 185,
  oBtnSuppBackOrd.Left    := 5,
  oBtnSuppBackOrd.Width   := 190,
  oBtnSuppBackOrd.Tag     := 5,
  oBtnSuppBackOrd.Caption := 'Zuliefererrückstände',
  oBtnSuppBackOrd.ImageIndex.IndexNormal := 503,
  assignevent(oBtnSuppBackOrd, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnProdArr.Top     := 215,
  oBtnProdArr.Left    := 5,
  oBtnProdArr.Width   := 190,
  oBtnProdArr.Tag     := 6,
  oBtnProdArr.Caption := 'Produktionsrückstände',
  oBtnProdArr.ImageIndex.IndexNormal := 224,
  assignevent(oBtnProdArr, 'OnClick', 'BtnCreateClick'),

  // Button
  oBtnDetach.Top     := 265,
  oBtnDetach.Left    := 5,
  oBtnDetach.Width   := 190,
  oBtnDetach.Caption := 'Fenster nicht andocken',
  oBtnDetach.ImageIndex.IndexNormal := 18,
  assignevent(oBtnDetach, 'OnClick', 'BtnDetachWindowClick'),

  // Formular anzeigen
  ShowModal(oForm),

OnError
   meld(GetErrorText()),
   DestroyObject( oForm ),
StopSeq,

Weitere Verknüpfungen


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.