毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

DELPHI办公管理系统 第25页

更新时间:2010-1-17:  来源:毕业论文
DELPHI办公管理系统 第25页
   begin
                                for I:=0 to  qPOST.RecordCount-1 do
                                  begin


                                           if fieldbyname('所属').AsString <>'' then
                                               begin
                                                 LISTBOX1.Items.Add(fieldbyname('所属').AsString);
                                                
                                                end;

                                     qPOST.Next ;
                                  end;
                       
                      end;


end;
end;

procedure TBM_POSTF.FormCreate(Sender: TObject);
begin
int2;
end;

procedure TBM_POSTF.ListBox1Click(Sender: TObject);
VAR
 sql1:string;
begin
     sql1:='select * from 邮编电话 where 所属="'+LISTBOX1.Items.Strings[LISTBOX1.ItemIndex]+'"';

             with qPOST2 do
                  begin
                  close;
                  sql.Clear ;
                  sql.Add(sql1);
                  Open ;
                  StatusBar1.SimpleText :='共有'+ inttostr(qPOST2.recordcount) +'条记录!';;
              end;
end;

procedure TBM_POSTF.DBGrid1DrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
begin
inherited;
  With DbGrid1 do
  begin
    if ((State = [gdSelected]) or (State = [gdSelected,gdFocused])) then
      begin
      Canvas.Font.Color := clYellow;
      Canvas.Brush.Color := clNavy;
      end
    else
      begin
      if DataCol mod 2 <> 0  then Canvas.Brush.Color := clWhite
      else Canvas.Brush.Color := $00EAEAEA;
      end;
    DefaultDrawColumnCell(Rect,DataCol,Column,State);
  end;
end;

procedure TBM_POSTF.SpeedButton1Click(Sender: TObject);
VAR
 sql1:string;
begin
   sql1:='select 所属,地区名称,邮政编码,电话区号 from 邮编电话 ';
    if edit1.Text <>'' then
    begin
      sql1:=sql1+'where 所属="'+edit1.Text +'"';
        if edit2.Text <>'' then sql1:=sql1+' and 地区名称="'+edit2.Text +'"';
        if edit3.Text <>'' then sql1:=sql1+' and 邮政编码="'+edit3.Text +'"';
        if edit4.Text <>'' then sql1:=sql1+' and 电话区号="'+edit4.Text +'"';
     end
     else
    ///////////////////////////
     if edit2.Text <>'' then
         begin
            sql1:=sql1+' where 地区名称="'+edit2.Text +'"';
         if edit3.Text <>'' then sql1:=sql1+' and 邮政编码="'+edit3.Text +'"';
         if edit4.Text <>'' then sql1:=sql1+' and 电话区号="'+edit4.Text +'"';
       end
       else//////////////////////
     if edit3.Text <>'' then
         begin
            sql1:=sql1+' where 邮政编码="'+edit3.Text +'"';
           if edit4.Text <>'' then sql1:=sql1+' and 电话区号="'+edit4.Text +'"';
        end
     else
     if  edit4.Text <>'' then sql1:=sql1+' where 电话区号="'+edit4.Text +'"';


             with qPOST2 do
                  begin
                  close;
                  sql.Clear ;
                  sql.Add(sql1);
                  Open ;
                  StatusBar1.SimpleText :='共有'+ inttostr(qPOST2.recordcount) +'条记录!';;
              end;

end;

procedure TBM_POSTF.SpeedButton2Click(Sender: TObject);
begin
close;
end;

procedure TBM_POSTF.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;

procedure TBM_POSTF.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  canclose:=true;
end;

end.

 << 上一页  [21] [22] [23] [24] [25] [26] 下一页

DELPHI办公管理系统 第25页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。