GoodManage.~cpp
上传用户:tangpei45
上传日期:2013-07-14
资源大小:9104k
文件大小:2k
- //----------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "GoodManage.h"
- //----------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TfmGoodManage *fmGoodManage;
- //----------------------------------------------------------------------------
- __fastcall TfmGoodManage::TfmGoodManage(TComponent *Owner)
- : TForm(Owner)
- {
- }
- //----------------------------------------------------------------------------
- void __fastcall TfmGoodManage::FormCreate(TObject *Sender)
- {
- Table1->Open();
- }
- //----------------------------------------------------------------------------
- void __fastcall TfmGoodManage::FormClose(TObject *Sender,
- TCloseAction &Action)
- {
- // 删除窗体并回收空间
- Action = caFree;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfmGoodManage::Button1Click(TObject *Sender)
- {
- Table1->Filtered = false;
- // 设置table控件的filter属性
- // 可以起到查询条件的作用
- if(Edit1->Text.Length()==0)
- Table1->Filter = "";
- else
- Table1->Filter = " 拼音编码 = '" + Edit1->Text + "*'";
- Table1->Filtered = true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfmGoodManage::DBGrid1DblClick(TObject *Sender)
- {
- if(m_Input)
- {
- m_szSelectCode = Table1->FieldByName("供货商号")->AsString;
- this->Close();
- }
- }
- //---------------------------------------------------------------------------