Unit4.pas
上传用户:szyozho
上传日期:2013-04-13
资源大小:3688k
文件大小:4k
源码类别:

教育系统应用

开发平台:

Delphi

  1. unit Unit4;
  2. interface
  3. uses
  4.   SysUtils, Classes, DB, DBTables;
  5. type
  6.   TDataModule4 = class(TDataModule)
  7.     Table_u: TTable;
  8.     DataSource_u: TDataSource;
  9.     DataSource_choose: TDataSource;
  10.     DataSource_filltext: TDataSource;
  11.     DataSource_judge: TDataSource;
  12.     DataSource_readpro: TDataSource;
  13.     Table_choose: TTable;
  14.     Table_filltext: TTable;
  15.     Table_judge: TTable;
  16.     Table_readpro: TTable;
  17.     DataSource_procedure: TDataSource;
  18.     Table_procedure: TTable;
  19.     Table_uID: TStringField;
  20.     Table_umi: TStringField;
  21.     Table_uqx: TStringField;
  22.     Table_choosetno: TIntegerField;
  23.     Table_choosetigan: TMemoField;
  24.     Table_choosexa: TStringField;
  25.     Table_choosexb: TStringField;
  26.     Table_choosexc: TStringField;
  27.     Table_choosexd: TStringField;
  28.     Table_chooseanswer: TStringField;
  29.     Table_choosescore: TSmallintField;
  30.     Table_choosedifficulty: TStringField;
  31.     Table_choosenote: TStringField;
  32.     DataSource_shijuan: TDataSource;
  33.     Table_shijuan: TTable;
  34.     Table_papermanager: TTable;
  35.     DataSource_papermanager: TDataSource;
  36.     procedure Table_chooseBeforeDelete(DataSet: TDataSet);
  37.     procedure Table_chooseAfterDelete(DataSet: TDataSet);
  38.     procedure Table_filltextBeforeDelete(DataSet: TDataSet);
  39.     procedure Table_judgeBeforeDelete(DataSet: TDataSet);
  40.     procedure Table_readproBeforeDelete(DataSet: TDataSet);
  41.     procedure Table_procedureBeforeDelete(DataSet: TDataSet);
  42.     procedure Table_filltextAfterDelete(DataSet: TDataSet);
  43.     procedure Table_judgeAfterDelete(DataSet: TDataSet);
  44.     procedure Table_readproAfterDelete(DataSet: TDataSet);
  45.     procedure Table_procedureAfterDelete(DataSet: TDataSet);
  46.     procedure Table_shijuanBeforeDelete(DataSet: TDataSet);
  47.   private
  48.     { Private declarations }
  49.   public
  50.     { Public declarations }
  51.   end;
  52. var
  53.   DataModule4: TDataModule4;
  54. implementation
  55. uses Unit3, Unit6, Unit7, Unit8, Unit9, Unit11, Unit10;
  56. {$R *.dfm}
  57. procedure TDataModule4.Table_chooseBeforeDelete(DataSet: TDataSet);
  58. begin
  59.     mainform.updateno:=0;
  60. mainform.updateno:=chooseform.Query1.FieldValues['tno'] ;
  61. //exit;
  62. //DBNavigator1.BtnClick(nbCancel);
  63. //showmessage('请选择一个章节点') ;
  64. //else
  65. //  mainform.updateno:=table_choose['tno'];
  66. end;
  67. procedure TDataModule4.Table_chooseAfterDelete(DataSet: TDataSet);
  68. begin
  69. DataModule4.Table_choose.Close;
  70. DataModule4.Table_choose.Open;
  71. DataModule4.Table_choose.Active:=false;
  72. DataModule4.Table_choose.Active:=true;
  73. end;
  74. procedure TDataModule4.Table_filltextBeforeDelete(DataSet: TDataSet);
  75. begin
  76. mainform.updateno:=0;
  77. mainform.updateno:=filltextform.Query1.FieldValues['tno'] ;
  78. end;
  79. procedure TDataModule4.Table_judgeBeforeDelete(DataSet: TDataSet);
  80. begin
  81. mainform.updateno:=0;
  82. mainform.updateno:=judgeform.Query1.FieldValues['tno'] ;
  83. end;
  84. procedure TDataModule4.Table_readproBeforeDelete(DataSet: TDataSet);
  85. begin
  86. mainform.updateno:=0;
  87. mainform.updateno:=readproform.Query1.FieldValues['tno'] ;
  88. end;
  89. procedure TDataModule4.Table_procedureBeforeDelete(DataSet: TDataSet);
  90. begin
  91. mainform.updateno:=0;
  92. mainform.updateno:=procedureform.Query1.FieldValues['tno'] ;
  93. end;
  94. procedure TDataModule4.Table_filltextAfterDelete(DataSet: TDataSet);
  95. begin
  96. DataModule4.Table_filltext.Close;
  97. DataModule4.Table_filltext.Open;
  98. DataModule4.Table_filltext.Active:=false;
  99. DataModule4.Table_filltext.Active:=true;
  100. end;
  101. procedure TDataModule4.Table_judgeAfterDelete(DataSet: TDataSet);
  102. begin
  103. DataModule4.Table_judge.Close;
  104. DataModule4.Table_judge.Open;
  105. DataModule4.Table_judge.Active:=false;
  106. DataModule4.Table_judge.Active:=true;
  107. end;
  108. procedure TDataModule4.Table_readproAfterDelete(DataSet: TDataSet);
  109. begin
  110. DataModule4.Table_readpro.Close;
  111. DataModule4.Table_readpro.Open;
  112. DataModule4.Table_readpro.Active:=false;
  113. DataModule4.Table_readpro.Active:=true;
  114. end;
  115. procedure TDataModule4.Table_procedureAfterDelete(DataSet: TDataSet);
  116. begin
  117. DataModule4.Table_procedure.Close;
  118. DataModule4.Table_procedure.Open;
  119. DataModule4.Table_procedure.Active:=false;
  120. DataModule4.Table_procedure.Active:=true;
  121. end;
  122. procedure TDataModule4.Table_shijuanBeforeDelete(DataSet: TDataSet);
  123. begin
  124. definepaperform.updatejno:=0;
  125. definepaperform.updatejno:=table_shijuan['jno'];
  126. end;
  127. end.