FRMLoginF.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /****************************************************************************
  2. * @source : FrmLoginF.h
  3. * @description : 사용자 로그인 처리 공통모듈
  4. ****************************************************************************
  5. * DATE AUTHOR DESCRIPTION
  6. * --------------------------------------------------------------------------
  7. * 2006/10/20 정승호 최초작성
  8. *
  9. ****************************************************************************/
  10. //---------------------------------------------------------------------------
  11. #ifndef FrmLoginFH
  12. #define FrmLoginFH
  13. //---------------------------------------------------------------------------
  14. #include <vcl.h>
  15. #include <Classes.hpp>
  16. #include <Controls.hpp>
  17. #include <StdCtrls.hpp>
  18. #include <Buttons.hpp>
  19. #include <ExtCtrls.hpp>
  20. #include <jpeg.hpp>
  21. #include <Graphics.hpp>
  22. #include <Menus.hpp>
  23. //---------------------------------------------------------------------------
  24. #include "ITSDbF.h"
  25. #include "cxButtons.hpp"
  26. #include "cxContainer.hpp"
  27. #include "cxControls.hpp"
  28. #include "cxEdit.hpp"
  29. #include "cxGraphics.hpp"
  30. #include "cxLabel.hpp"
  31. #include "cxLookAndFeelPainters.hpp"
  32. #include "cxLookAndFeels.hpp"
  33. #include "dxSkinBlack.hpp"
  34. #include "dxSkinBlue.hpp"
  35. #include "dxSkinCaramel.hpp"
  36. #include "dxSkinCoffee.hpp"
  37. #include "dxSkinDarkRoom.hpp"
  38. #include "dxSkinDarkSide.hpp"
  39. #include "dxSkinFoggy.hpp"
  40. #include "dxSkinGlassOceans.hpp"
  41. #include "dxSkiniMaginary.hpp"
  42. #include "dxSkinLilian.hpp"
  43. #include "dxSkinLiquidSky.hpp"
  44. #include "dxSkinLondonLiquidSky.hpp"
  45. #include "dxSkinMcSkin.hpp"
  46. #include "dxSkinMoneyTwins.hpp"
  47. #include "dxSkinOffice2007Black.hpp"
  48. #include "dxSkinOffice2007Blue.hpp"
  49. #include "dxSkinOffice2007Green.hpp"
  50. #include "dxSkinOffice2007Pink.hpp"
  51. #include "dxSkinOffice2007Silver.hpp"
  52. #include "dxSkinOffice2010Black.hpp"
  53. #include "dxSkinOffice2010Blue.hpp"
  54. #include "dxSkinOffice2010Silver.hpp"
  55. #include "dxSkinsCore.hpp"
  56. #include "dxSkinSeven.hpp"
  57. #include "dxSkinSharp.hpp"
  58. #include "dxSkinSilver.hpp"
  59. #include "dxSkinStardust.hpp"
  60. #include <ADODB.hpp>
  61. #include <DB.hpp>
  62. //---------------------------------------------------------------------------
  63. //---------------------------------------------------------------------------
  64. #define USER_LOGIN_TRY_CNT 3
  65. typedef enum
  66. {
  67. LOGIN_OK = 0,
  68. LOGIN_ID_ERR,
  69. LOGIN_PSWD_ERR,
  70. LOGIN_DB_ERR,
  71. } EN_LOGIN;
  72. //---------------------------------------------------------------------------
  73. class TFRMLogin : public TForm
  74. {
  75. __published: // IDE-managed Components
  76. TPanel *Panel1;
  77. TEdit *EdUserID;
  78. TEdit *EdPswd;
  79. TCheckBox *ChkIdSave;
  80. TImage *Image1;
  81. TcxButton *BtnLogin;
  82. TcxButton *BtnPswdChnge;
  83. TcxButton *BtnClose;
  84. TcxLabel *cxLabel1;
  85. TcxLabel *cxLabel2;
  86. TcxLabel *LbMessage;
  87. void __fastcall BtnCloseClick(TObject *Sender);
  88. void __fastcall BtnPswdChngeClick(TObject *Sender);
  89. void __fastcall BtnLoginClick(TObject *Sender);
  90. void __fastcall FormShow(TObject *Sender);
  91. void __fastcall EdUserIDKeyPress(TObject *Sender, char &Key);
  92. void __fastcall EdPswdKeyPress(TObject *Sender, char &Key);
  93. void __fastcall FormCreate(TObject *Sender);
  94. void __fastcall Image1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  95. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  96. private: // User declarations
  97. public: // User declarations
  98. __fastcall TFRMLogin(TComponent* Owner);
  99. void __fastcall SetLocalSkin();
  100. int __fastcall GetUserPassword(String sUserID, String sPswd);
  101. String __fastcall GetLocalIp();
  102. String __fastcall GetPassword(String APswd);
  103. int m_nLoginTryCnt;
  104. String m_sUserName;
  105. String m_sUserID;
  106. String m_sUserRightID;
  107. String m_sUserRightName;
  108. String m_sLoginTime;
  109. bool m_bLogin;
  110. };
  111. //---------------------------------------------------------------------------
  112. extern PACKAGE TFRMLogin *FRMLogin;
  113. //---------------------------------------------------------------------------
  114. #endif