Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit frmEstimCalcCost;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, frmCustomMDI, Menus, ImgList, Grids, DBGrids, ExtCtrls, StdCtrls,
- DB, IBCustomDataSet, IBQuery, IBUpdateSQL, IBStoredProc, DBGridEh, DBCtrls,
- Mask, ComCtrls, ToolWin, DBCtrlsEh, DBLookupEh, ActnList, frmCustom,
- Buttons, ToolCtrlsEh, untCommonMineParams, IBDatabase;
- type
- TfmEstimCalcCost = class(TfmCustomMDI)
- pcComplexContent: TPageControl;
- tsEquipLifting: TTabSheet;
- tsEquipPumping: TTabSheet;
- lCentroPumpCount: TLabel;
- lFactWaterFlow: TLabel;
- lFactWaterHeader: TLabel;
- lFactorElectroLube: TLabel;
- lEquipLiftingRopeLength: TLabel;
- lEquipLiftingRopeDiameter: TLabel;
- tsEquipUnderground: TTabSheet;
- tsOtherCost: TTabSheet;
- tsLoaders: TTabSheet;
- lMachineWork: TLabel;
- lAngleSlope: TLabel;
- lInitDepthTrunk: TLabel;
- lUseMode: TLabel;
- lNumberHorizont: TLabel;
- lTailRopeType: TLabel;
- dbeEquipLiftingRopeLength: TDBEditEh;
- edEquipLiftingRopeDiameter: TDBEditEh;
- dbeAngleSlope: TDBEditEh;
- dbeInitDepthTrunk: TDBEditEh;
- dbeNumberHorizont: TDBEditEh;
- dbeFactorElectroLube: TDBEditEh;
- lReceivingAreasCount: TLabel;
- lUndergroundAngleSlope: TLabel;
- lTrunkCount: TLabel;
- lUseFixedBuilding: TLabel;
- lTrunkMethod: TLabel;
- lWorkDuration: TLabel;
- lMainMachine: TLabel;
- lWorkingPumpNumber: TLabel;
- cbUseCounterWeight: TDBCheckBoxEh;
- pnlTop: TPanel;
- lWorkMode: TLabel;
- dbeMachineWork: TDBEditEh;
- lUseEquip: TLabel;
- cbUseMode: TDBComboBoxEh;
- cbTailRopeType: TDBComboBoxEh;
- edFactWaterFlow: TDBEditEh;
- edFactWaterHeader: TDBEditEh;
- edWorkingPumpNumber: TDBEditEh;
- cbTrunkCount: TDBComboBoxEh;
- cbReceivingAreasCount: TDBComboBoxEh;
- edUndergroundAngleSlope: TDBEditEh;
- lTeam: TLabel;
- dbeTeam: TDBEditEh;
- qMainID: TIntegerField;
- qMainWORKDURATION: TIntegerField;
- qMainEQUIPID: TIntegerField;
- qMainEQUIPNAME: TStringField;
- qMainTEAMID: TIntegerField;
- qMainTEAMNAME: TStringField;
- qMainWORKMODE: TFloatField;
- lTubVolume: TLabel;
- lUse4EmergencyExit: TLabel;
- lWagonVolume: TLabel;
- lEquipLiftingRenditionType: TLabel;
- lFinalDepthTrunk: TLabel;
- dbeFinalDepthTrunk: TDBEditEh;
- tsTipperLifting: TTabSheet;
- tsWinchLifting: TTabSheet;
- lWinchLiftingRenditionType: TLabel;
- tsShelfLifting: TTabSheet;
- lUseOnlyZeroFrame: TLabel;
- lDurationZeroFrame: TLabel;
- lFactorAmotrize: TLabel;
- lPresentRegimentShelf: TLabel;
- edDurationZeroFrame: TDBEditEh;
- edFactorAmotrize: TDBEditEh;
- tsHelpEquipLifting: TTabSheet;
- lHelpEquipRopeLength: TLabel;
- edHelpEquipRopeLength: TDBEditEh;
- lHelpEquipRopeDiameter: TLabel;
- edHelpEquipRopeDiameter: TDBEditEh;
- tsComplexWagonLifting: TTabSheet;
- tsHedingComplex: TTabSheet;
- lUseCounterWeight: TLabel;
- lWinchLiftingRopeLength: TLabel;
- edWinchLiftingRopeLength: TDBEditEh;
- lWinchLiftingRopeDiameter: TLabel;
- edWinchLiftingRopeDiameter: TDBEditEh;
- tsSettlingTanksVenting: TTabSheet;
- cbCentroPumpCount: TDBComboBoxEh;
- tsEquipVenting: TTabSheet;
- lFactEquipPower: TLabel;
- lFactorAmortizeRepairs: TLabel;
- lFanCount: TLabel;
- edFactEquipPower: TDBEditEh;
- edFanCount: TDBEditEh;
- edFactorAmortizeRepairs: TDBEditEh;
- lRenditionType: TLabel;
- cbRenditionType: TDBComboBoxEh;
- tsConditionVenting: TTabSheet;
- lEquipUndergroundRopeLength: TLabel;
- lEquipUndergroundRopeDiameter: TLabel;
- edEquipUndergroundRopeLength: TDBEditEh;
- edEquipUndergroundRopeDiameter: TDBEditEh;
- tsWinchUnderground: TTabSheet;
- lWinchUndergroundRopeLength: TLabel;
- lWinchUndergroundRopeDiameter: TLabel;
- edWinchUndergroundRopeLength: TDBEditEh;
- edWinchUndergroundRopeDiameter: TDBEditEh;
- tsElectroUndeground: TTabSheet;
- tsGarageUnderground: TTabSheet;
- tsRoadUnderground: TTabSheet;
- tsConveyorUnderground: TTabSheet;
- tsComplexWagonUnderground: TTabSheet;
- lRoadUndergroundRopeLength: TLabel;
- lRoadUndergroundRopeDiameter: TLabel;
- edRoadUndergroundRopeLength: TDBEditEh;
- edRoadUndergroundRopeDiameter: TDBEditEh;
- lMineWork: TLabel;
- qMainMINECOMPLEXID: TIntegerField;
- qMainROPELENGTH: TFloatField;
- qMainROPEDIAMETER: TFloatField;
- dbeWorkDuration: TDBEditEh;
- dbeWorkMode: TDBEditEh;
- qMainUSEEQUIPID: TIntegerField;
- qMainANGLESLOPE: TSmallintField;
- qMainTUBVOLUMEID: TSmallintField;
- qMainWAGONVOLUMEID: TSmallintField;
- qMainUSE4EMERGENCYEXIT: TIntegerField;
- qMainRENDITIONTYPEID: TIntegerField;
- qMainFINALDEPTHTRUNK: TFloatField;
- qMainUSEMODEID: TIntegerField;
- qMainUSECOUNTERWEIGHT: TSmallintField;
- qMainNUMBERHORIZONT: TIntegerField;
- qMainTAILROPETYPEID: TSmallintField;
- qMainUSEONLYZEROFRAME: TSmallintField;
- qMainDURATIONZEROFRAME: TFloatField;
- qMainPRESENTREGIMENTSHELF: TSmallintField;
- qMainSUBCOMPLEXID: TSmallintField;
- cbUseEquip: TDBComboBoxEh;
- dbTubVolume: TDBComboBoxEh;
- dbWagonVolume: TDBComboBoxEh;
- cbEquipLiftingRenditionType: TDBComboBoxEh;
- cblWinchLiftingRenditionType: TDBComboBoxEh;
- cbUse4EmergencyExit: TDBCheckBoxEh;
- qMainINITDEPTHTRUNK: TFloatField;
- qMainFACTORELECTROLUBE: TFloatField;
- cbUseOnlyZeroFrame: TDBCheckBoxEh;
- cbPresentRegimentShelf: TDBCheckBoxEh;
- qMainFACTORAMORTIZE: TFloatField;
- cbMainMachine: TDBCheckBoxEh;
- qMainPUMPCOUNTID: TSmallintField;
- qMainFACTWATERFLOW: TFloatField;
- cbUseFixedBuilding: TDBCheckBoxEh;
- cbTrunkMethod: TDBComboBoxEh;
- lMinePumpCount: TLabel;
- cbMinePumpCount: TDBComboBoxEh;
- qMainFACTWATERHEADER: TFloatField;
- qMainMAINMACHINE: TSmallintField;
- qMainWORKINGPUMPNUMBER: TIntegerField;
- qMainRECEIVINGAREASCOUNT: TIntegerField;
- qMainFACTEQUIPPOWER: TFloatField;
- qMainFANCOUNT: TIntegerField;
- qMainFACTORAMORTIZEREPAIRS: TFloatField;
- cbMineWork: TDBCheckBoxEh;
- qMainMINEWORK: TSmallintField;
- qMainUSEFIXEDBUILDING: TSmallintField;
- qMainTRUNKCOUNT: TIntegerField;
- qMainTRUNKMETHOD: TSmallintField;
- lConveyorLength: TLabel;
- edConveyorLength: TDBEditEh;
- qMainCONVEYORLENGTH: TFloatField;
- lDepthHorizont: TLabel;
- cbDepthHorizont: TDBComboBoxEh;
- qMainDEPTHHORIZONT: TSmallintField;
- procedure dbeMachineWorkEditButtons0Click(Sender: TObject;
- var Handled: Boolean);
- procedure qMainSUBCOMPLEXIDChange(Sender: TField);
- procedure qMainAfterOpen(DataSet: TDataSet);
- procedure qMainAfterScroll(DataSet: TDataSet);
- procedure dbeTeamEditButtons0Click(Sender: TObject;
- var Handled: Boolean);
- procedure qMainEQUIPIDChange(Sender: TField);
- procedure cbUseOnlyZeroFrameClick(Sender: TObject);
- procedure acInsertExecute(Sender: TObject);
- procedure acEditExecute(Sender: TObject);
- private
- procedure UpdateComplexContent;
- procedure UpdateComplexContentPage;
- procedure ChangeEquip;
- procedure ChangeTeam;
- procedure UpdateTeam;
- //function CreateOutputClass(aCommonMineParamsClass: TCommonMineParamsClass): TCommonMineParams;
- public
- procedure SetState(aFormsState: TFormsState); override;
- class procedure CreateParamsForm(aOwner: TComponent; aDataBase: TIBDatabase;
- aFormsState: TFormsState; aParams: TCommonMineParams);
- private
- function GetComplexClass(aId: Integer): TCommonMineParamsClass;
- end;
- implementation
- {$R *.dfm}
- function TfmEstimCalcCost.GetComplexClass(aId: Integer): TCommonMineParamsClass;
- begin
- case aId of
- 1: Result := TLiftingParams;
- 2: Result := TPumpingParams;
- 3: Result := TVentingParams;
- 4: Result := TUndergroungParams;
- //5: Result := TLiftingParams;
- 6: Result := TOtherCommonMineParams;
- 7: Result := TLoadersParams;
- else
- Result := TCommonMineParams;
- end
- end;
- class procedure TfmEstimCalcCost.CreateParamsForm(aOwner: TComponent; aDataBase: TIBDatabase;
- aFormsState: TFormsState; aParams: TCommonMineParams);
- begin
- with TfmEstimCalcCost.Create(aOwner, aDataBase, aFormsState) do
- try
- if ShowModal = mrOk then
- begin
- if not (Assigned(aParams)) then
- aParams := GetComplexClass(qMainMINECOMPLEXID.AsInteger).Create
- else if (aParams.ComplexId <> qMainMINECOMPLEXID.AsInteger) then
- begin
- aParams.Free;
- aParams := GetComplexClass(qMainMINECOMPLEXID.AsInteger).Create;
- end;
- with aParams do
- begin
- ComplexId := qMainMINECOMPLEXID.AsInteger;
- EuqipId := qMainEQUIPID.AsInteger;
- EuqipNameRU := qMainEQUIPNAME.AsString;
- TeamId := qMainTEAMID.AsInteger;
- with GetQuery('SELECT ec.underworkcost, ' + #13#10 +
- ' ec.overworkcost, ' + #13#10 +
- ' case ' + #13#10 +
- ' when ec.subcomplexid = 1 then ' + #13#10 +
- ' (select elc.valuecost ' + #13#10 +
- ' from ElectroCost elc ' + #13#10 +
- ' where elc.DepthHorizontId = :aDepthHorizontId ' + #13#10 +
- ' and elc.VolumeId = :aVolumeId ' + #13#10 +
- S ' and elc.lifttypeid = (case ' + #13#10 +
- ' when ec.id between 1 and 17 then ' + #13#10 +
- ' 1 ' + #13#10 +
- ' when ec.id between 18 and 25 then ' + #13#10 +
- ' 2 ' + #13#10 +
- ' when ec.id between 26 and 29 then ' + #13#10 +
- ' 3 ' + #13#10 +
- ' end)) ' + #13#10 +
- ' else ' + #13#10 +
- ' ec.ElectroCost ' + #13#10 +
- ' end As ElectroCost, ' + #13#10 +
- ' pressaircost, ' + #13#10 +
- ' dieselcost, ' + #13#10 +
- ' greasecost, ' + #13#10 +
- ' hydrauliccost, ' + #13#10 +
- ' underrepaircost, ' + #13#10 +
- ' overrepaircost ' + #13#10 +
- ' FROM equipcost ec ' + #13#10 +
- ' WHERE Id = '+ qMainEQUIPID.AsString, False) do
- try
- Prepare;
- if not qMainDEPTHHORIZONT.IsNull then
- ParamByName('aDepthHorizontId').AsInteger := qMainDEPTHHORIZONT.AsInteger
- else
- ParamByName('aDepthHorizontId').Clear;
- if (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 25) then
- begin
- if not qMainTUBVOLUMEID.IsNull then
- ParamByName('aVolumeId').AsInteger := qMainTUBVOLUMEID.AsInteger
- else
- ParamByName('aVolumeId').Clear;
- end
- else if (qMainEQUIPID.AsInteger >= 26) and (qMainEQUIPID.AsInteger <= 29) then
- begin
- if not qMainWAGONVOLUMEID.IsNull then
- ParamByName('aVolumeId').AsInteger := qMainWAGONVOLUMEID.AsInteger
- else
- ParamByName('aVolumeId').Clear;
- end;
- Open;
- ElectroCost := FieldByName('electrocost').AsFloat;
- PressAirCost := FieldByName('pressaircost').AsFloat;
- DieselCost := FieldByName('dieselcost').AsFloat;
- GreaseCost := FieldByName('greasecost').AsFloat;
- HydroCost := FieldByName('hydrauliccost').AsFloat;
- OverRepairCost := FieldByName('overrepaircost').AsFloat;
- UnderRepairCost := FieldByName('underrepaircost').AsFloat;
- finally
- Free;
- end;
- case qMainMINECOMPLEXID.AsInteger of
- 1:
- with TLiftingParams(aParams) do
- begin
- if qMainSUBCOMPLEXID.AsInteger in [1, 2, 4] then
- begin
- RopeLength := qMainROPELENGTH.AsFloat;
- RopeDiameter := qMainROPEDIAMETER.AsFloat;
- AngleSlope := qMainANGLESLOPE.AsInteger;
- end;
- end;
- 2:
- with TPumpingParams(aParams) do
- begin
- end;
- 3:
- with TVentingParams(aParams) do
- begin
- end;
- 4:
- with TUndergroungParams(aParams) do
- begin
- if qMainSUBCOMPLEXID.AsInteger = 17 then
- begin
- ConveyorLength := qMainCONVEYORLENGTH.AsFloat;
- end;
- if qMainSUBCOMPLEXID.AsInteger in [12, 13, 19] then
- begin
- RopeLength := qMainROPELENGTH.AsFloat;
- RopeDiameter := qMainROPEDIAMETER.AsFloat;
- AngleSlope := qMainANGLESLOPE.AsInteger;
- end;
- end;
- 6:
- with TOtherCommonMineParams(aParams) do
- begin
- end;
- 7:
- with TLoadersParams(aParams) do
- begin
- E
- end;
- end;
- end;
- end;
- finally
- Free;
- end;
- end;
- procedure TfmEstimCalcCost.dbeMachineWorkEditButtons0Click(Sender: TObject;
- var Handled: Boolean);
- begin
- inherited;
- ChangeEquip;
- end;
- procedure TfmEstimCalcCost.ChangeEquip;
- begin
- with TfmCustomMDI.CreateFormEx(Self, qMain.Database, 'MWork','TfmEquipCost', fsGets) do
- try
- lParamId := qMainEQUIPID.AsString;
- lParamValue := qMainMINECOMPLEXID.AsString;
- if ShowModal = mrOk then
- begin
- Self.qMainMINECOMPLEXID.AsString := aReturnThirdId;
- Self.qMainSUBCOMPLEXID.AsString := aReturnSecondId;
- Self.qMainEQUIPID.AsString := aReturnId;
- Self.qMainEQUIPNAME.AsString := aReturnName;
- UpdateTeam;
- end;
- finally
- Free;
- end;
- end;
- procedure TfmEstimCalcCost.UpdateTeam;
- begin
- if (lFormsState in [fsInsert, fsModify, fsAmend]) and (not qMainEQUIPID.IsNull) then
- with GetQuery('SELECT te.Id, '+
- ' te.UseEquipName '+
- ' FROM Team te, '+
- ' Equipteam et '+
- ' WHERE te.id = et.teamid '+
- ' AND et.Equipcostid = '+ qMainEQUIPID.AsString +
- ' AND et.ComplexId = '+ qMainMINECOMPLEXID.AsString) do
- try
- if RecordCount = 0 then
- begin
- qMainTEAMID.Clear;
- qMainTEAMNAME.Clear;
- dbeTeam.Enabled := False;
- lTeam.Enabled := False;
- end
- else if RecordCount = 1 then
- begin
- qMainTEAMID.AsString := FieldByName('Id').AsString;
- qMainTEAMNAME.AsString := FieldByName('UseEquipName').AsString;
- dbeTeam.Enabled := False;
- lTeam.Enabled := False;
- end
- else
- begin
- qMainTEAMID.Clear;
- qMainTEAMNAME.Clear;
- dbeTeam.Enabled := True;
- lTeam.Enabled := True;
- end;
- finally
- Free;
- end
- else
- begin
- dbeTeam.Enabled := False;
- lTeam.Enabled := False;
- end;
- end;
- procedure TfmEstimCalcCost.ChangeTeam;
- begin
- with TfmCustomMDI.CreateFormEx(Self, qMain.Database, 'MWork','TfmTeamWorkerCost', fsGets) do
- try
- lParamValue := qMainEQUIPID.AsString;
- if ShowModal = mrOk then
- qMainTEAMID.AsString := aReturnId;
- qMainTEAMNAME.AsString := aReturnName;
- finally
- Free;
- end;
- end;
- procedure TfmEstimCalcCost.UpdateComplexContent;
- begin
- if not qMainSUBCOMPLEXID.IsNull then
- begin
- pcComplexContent.Visible := True;
- pcComplexContent.ActivePageIndex := qMainSUBCOMPLEXID.AsInteger - 1;
- end
- else
- pcComplexContent.Visible := False;
- end;
- procedure TfmEstimCalcCost.qMainSUBCOMPLEXIDChange(Sender: TField);
- begin
- inherited;
- UpdateComplexContent;
- end;
- procedure TfmEstimCalcCost.qMainAfterOpen(DataSet: TDataSet);
- begin
- inherited;
- UpdateComplexContent;
- UpdateComplexContentPage;
- end;
- procedure TfmEstimCalcCost.qMainAfterScroll(DataSet: TDataSet);
- begin
- inherited;
- UpdateComplexContent;
- UpdateComplexContentPage;
- end;
- procedure TfmEstimCalcCost.UpdateComplexContentPage;
- begin
- dbeMachineWork.EditButtons.Items[0].Visible := (lFormsState in [fsInsert, fsModify, fsAmend]);
- dbeTeam.EditButtons.Items[0].Visible := (lFormsState in [fsInsert, fsModify, fsAmend]);
- case qMainSUBCOMPLEXID.AsInteger of
- 1:begin
- lAngleSlope.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 59);
- dbeAngleSlope.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 59);
- if (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 59) then
- dbeAngleSlope.DataField := 'ANGLESLOPE'
- else
- dbeAngleSlope.DataField := '';
- lTubVolume.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 17);
- dbTubVolume.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 17);
- lWagonVolume.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- dbWagonVolume.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- lUse4EmergencyExit.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- cbUse4EmergencyExit.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- lEquipLiftingRenditionType.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 17);
- cbEquipLiftingRenditionType.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 17);
- lInitDepthTrunk.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 17);
- dbeInitDepthTrunk.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 17);
- lUseCounterWeight.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- cbUseCounterWeight.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- lTailRopeType.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- cbTailRopeType.Enabled := (qMainEQUIPID.AsInteger >= 18) and (qMainEQUIPID.AsInteger <= 29);
- lDepthHorizont.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 29);
- cbDepthHorizont.Enabled := (qMainEQUIPID.AsInteger >= 1) and (qMainEQUIPID.AsInteger <= 29);
- end;
- 2:begin
- lWinchLiftingRenditionType.Enabled := (qMainEQUIPID.AsInteger >= 30) and (qMainEQUIPID.AsInteger <= 39);
- cblWinchLiftingRenditionType.Enabled := (qMainEQUIPID.AsInteger >= 30) and (qMainEQUIPID.AsInteger <= 39);
- if cblWinchLiftingRenditionType.Enabled then
- cblWinchLiftingRenditionType.DataField := 'RENDITIONTYPEID'
- else
- cblWinchLiftingRenditionType.DataField := '';
- end;
- 3:begin
- lPresentRegimentShelf.Enabled := (cbUseOnlyZeroFrame.Checked);
- cbPresentRegimentShelf.Enabled := (cbUseOnlyZeroFrame.Checked);
- end;
- 8:begin
- lCentroPumpCount.Enabled := (qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95);
- cbCentroPumpCount.Enabled := (qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95);
- lMinePumpCount.Enabled := (qMainEQUIPID.AsInteger >= 96) and (qMainEQUIPID.AsInteger <= 98);
- cbMinePumpCount.Enabled := (qMainEQUIPID.AsInteger >= 96) and (qMainEQUIPID.AsInteger <= 98);
- lFactWaterFlow.Enabled := ((qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95)) or (qMainEQUIPID.AsInteger = 100);
- edFactWaterFlow.Enabled := ((qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95)) or (qMainEQUIPID.AsInteger = 100);
- lMainMachine.Enabled := (qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95);
- cbMainMachine.Enabled := (qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95);
- lWorkingPumpNumber.Enabled := (qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95);
- lWorkingPumpNumber.Enabled := (qMainEQUIPID.AsInteger >= 70) and (qMainEQUIPID.AsInteger <= 95);
- end;
- 10:begin
- lFactEquipPower.Enabled := (qMainEQUIPID.AsInteger >= 102) and (qMainEQUIPID.AsInteger <= 116);
- edFactEquipPower.Enabled := (qMainEQUIPID.AsInteger >= 102) and (qMainEQUIPID.AsInteger <= 116);
- lRenditionType.Enabled := (qMainEQUIPID.AsInteger >= 117) and (qMainEQUIPID.AsInteger <= 127);
- cbRenditionType.Enabled := (qMainEQUIPID.AsInteger >= 117) and (qMainEQUIPID.AsInteger <= 127);
- lFanCount.Enabled := (qMainEQUIPID.AsInteger >= 117) and (qMainEQUIPID.AsInteger <= 127);
- edFanCount.Enabled := (qMainEQUIPID.AsInteger >= 117) and (qMainEQUIPID.AsInteger <= 127);
- end;
- 18:begin
- lMineWork.Enabled := (qMainEQUIPID.AsInteger >= 163) and (qMainEQUIPID.AsInteger <= 165);
- cbMineWork.Enabled := (qMainEQUIPID.AsInteger >= 163) and (qMainEQUIPID.AsInteger <= 165);
- end;
- end;
- end;
- procedure TfmEstimCalcCost.dbeTeamEditButtons0Click(Sender: TObject;
- var Handled: Boolean);
- begin
- inherited;
- ChangeTeam;
- end;
- procedure TfmEstimCalcCost.SetState(aFormsState: TFormsState);
- begin
- inherited;
- UpdateComplexContentPage;
- if (aFormsState = fsAmend) then
- UpdateTeam;
- end;
- procedure TfmEstimCalcCost.qMainEQUIPIDChange(Sender: TField);
- begin
- inherited;
- UpdateComplexContentPage;
- end;
- procedure TfmEstimCalcCost.cbUseOnlyZeroFrameClick(Sender: TObject);
- begin
- inherited;
- UpdateComplexContentPage;
- end;
- procedure TfmEstimCalcCost.acInsertExecute(Sender: TObject);
- begin
- inherited;
- UpdateTeam;
- end;
- procedure TfmEstimCalcCost.acEditExecute(Sender: TObject);
- begin
- inherited;
- UpdateTeam;
- end;
- initialization
- RegisterClass(TfmEstimCalcCost);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement