roomstatus.~h
来自「全面剖析酒店管理的内容」· ~H 代码 · 共 74 行
~H
74 行
//---------------------------------------------------------------------------
#ifndef RoomStatusH
#define RoomStatusH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <Graphics.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TfmRoomStatus : public TForm
{
__published: // IDE-managed Components
TGroupBox *GroupBox1;
TGroupBox *GroupBox2;
TButton *btUpdateStatus;
TButton *btSetStatus;
TLabel *Label1;
TGroupBox *GroupBox3;
TImage *imEmpty;
TRadioButton *rbEmpty;
TRadioButton *rbNoEmpty;
TRadioButton *rbSelf;
TRadioButton *rbMaintain;
TRadioButton *rbArrive;
TRadioButton *rbLeave;
TImage *imNoEmpty;
TImage *imSelf;
TImage *imMaintain;
TImage *imArrive;
TImage *imLeave;
TStringGrid *StringGrid1;
void __fastcall btUpdateStatusClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall StringGrid1DrawCell(TObject *Sender, int ACol,
int ARow, TRect &Rect, TGridDrawState State);
void __fastcall StringGrid1SelectCell(TObject *Sender, int ACol,
int ARow, bool &CanSelect);
void __fastcall btSetStatusClick(TObject *Sender);
void __fastcall StringGrid1DblClick(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
private: // User declarations
// 保存StringGrid各个Cell对应的客房编号,供文字输出时使用
AnsiString szCellCode[100][100];
// 当前选择的行和列,对应选择的客房
int m_nCurCol;
int m_nCurRow;
public: // User declarations
__fastcall TfmRoomStatus(TComponent* Owner);
// 窗体状态,0为选择客房,不可编辑房态,1为可以进行维护
int m_SelectRoom;
// 设置窗体状态的函数
void SetSelect(int nSel)
{
m_SelectRoom = nSel;
if(m_SelectRoom == 0) // 选择客房,不可编辑
btSetStatus->Enabled = false;
};
// 选择的客房编号
AnsiString m_RoomCode;
// 初始化客房的类型,只显示相应的类型
AnsiString m_RoomType;
};
//---------------------------------------------------------------------------
extern PACKAGE TfmRoomStatus *fmRoomStatus;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?