selectstore.~cpp
上传用户:tangpei45
上传日期:2013-07-14
资源大小:9104k
文件大小:1k
源码类别:

百货/超市行业

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "selectstore.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma resource "*.dfm"
  8. TfmSelectStore *fmSelectStore;
  9. //---------------------------------------------------------------------------
  10. __fastcall TfmSelectStore::TfmSelectStore(TComponent* Owner)
  11.     : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TfmSelectStore::DBGrid1DblClick(TObject *Sender)
  16. {
  17.     if(Query1->FieldByName("仓库"))
  18.     {
  19.         // 选择的仓库
  20.         m_szSelectStore = Query1->FieldByName("仓库")->AsString;
  21.         // 选择的仓库对应的库存
  22.         m_dStoreNumber = Query1->FieldByName("仓库")->AsFloat;
  23.     }
  24.     if(!m_szSelectStore.IsEmpty())   // 选择了一个仓库,关闭该窗体
  25.         this->Close();
  26. }
  27. //---------------------------------------------------------------------------