with DModule do
      begin
        adoq_share.Close;
        adoq_share.SQL.Clear;
        adoq_share.SQL.Add('select * from depot where depot_name=:A');
        adoq_share.Parameters.ParamByName('A').Value:=trim(cbox.Text);
        adoq_share.Open;        if  adoq_share.Eof then
        begin
           messagebox(0,'机房名错误,请确定','信息提示',mb_ok+mb_iconwarning);
           exit;
        end else
        begin           ADOQ_share.Edit;
           adoq_share.Delete;
           adoq_share.Post;           adoq_share.Close;
           adoq_share.SQL.Clear;
           adoq_share.SQL.Add('select * from computer where depot_name=:A');
           adoq_share.Parameters.ParamByName('A').Value:=trim(cbox.Text);
           adoq_share.Open;           ADOQ_share.Edit;
           while not adoq_share.Eof  do
           begin
              adoq_share.Delete;
              adoq_share.Post;
           end;
           IF messagebox(0,'删除成功,您还需要操作吗?',
              '信息提示',mb_yesno+mb_defbutton2+mb_iconquestion)=idyes then
           begin
              cbox.Items.Delete(cbox.ItemIndex);
              exit;
           end else
           begin
              close;
           end;        end;
      end;