selectstore.cpp
上传用户:tangpei45
上传日期:2013-07-14
资源大小:9104k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "selectstore.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TfmSelectStore *fmSelectStore;
- //---------------------------------------------------------------------------
- __fastcall TfmSelectStore::TfmSelectStore(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TfmSelectStore::DBGrid1DblClick(TObject *Sender)
- {
- if(Query1->FieldByName("仓库"))
- {
- // 选择的仓库
- m_szSelectStore = Query1->FieldByName("仓库")->AsString;
- // 选择的仓库对应的库存
- m_dStoreNumber = Query1->FieldByName("库存数量")->AsFloat;
- }
- if(!m_szSelectStore.IsEmpty()) // 选择了一个仓库,关闭该窗体
- this->Close();
- }
- //---------------------------------------------------------------------------