//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Insert.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TInsertForm *InsertForm;
//---------------------------------------------------------------------------
__fastcall TInsertForm::TInsertForm(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TInsertForm::BitBtn1Click(TObject *Sender)
{
  /* Edit1->Text =    MaskEdit1->Text;
     */

    Table1->Append();
Table1->FieldByName("StuId")->AsInteger = StrToInt(Edit1->Text);
Table1->FieldByName("name")->AsString = Edit2->Text;
Table1->FieldByName("gender")->AsString = Edit3->Text;
Table1->FieldByName("birthday")->AsString = MaskEdit1->Text;
Table1->FieldByName("native")->AsString = Edit4->Text;
Table1->FieldByName("speciality")->AsString = Edit5->Text;
Table1->FieldByName("grade")->AsFloat = StrToFloat(Edit6->Text);
Table1->FieldByName("remark")->AsString = Memo1->Text;
    Table1->Post();
    Table1->Refresh();   //需要创建唯一索引 
   

   
}
//---------------------------------------------------------------------------
