Unit2.cpp
上传用户:wangli
上传日期:2008-04-19
资源大小:3077k
文件大小:1k
源码类别:

xml/soap/webservice

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "Unit2.h"
  5. #include "Unit1.h"
  6. //---------------------------------------------------------------------------
  7. #pragma package(smart_init)
  8. #pragma resource "*.dfm"
  9. TForm2 *Form2;
  10. //---------------------------------------------------------------------------
  11. __fastcall TForm2::TForm2(TComponent* Owner)
  12.         : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TForm2::Button2Click(TObject *Sender)
  17. {
  18. Form2->Close() ;
  19. }
  20. //---------------------------------------------------------------------------
  21. void __fastcall TForm2::FormCreate(TObject *Sender)
  22. {
  23. Edit1->Text=Date();
  24. }
  25. //---------------------------------------------------------------------------
  26. void __fastcall TForm2::Button1Click(TObject *Sender)
  27. {
  28. int item= Form1->lstMain->Items->Count+1;
  29. //ShowMessage(item);
  30. //AddTask(1,Date(),"支出",33,"lkdlkdfklkl");
  31. Form1->AddTask(item,Edit1->Text,ComboBox1->Text,String(Edit3->Text).ToInt(),Edit4->Text);
  32. Form1->refresh();
  33. }
  34. //---------------------------------------------------------------------------