⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainunit.pas

📁 龙矿集团工资管理系统2004源码
💻 PAS
📖 第 1 页 / 共 4 页
字号:
    begin
    mainform.Hide;
    application.Terminate;
    end;
    // close;
end;  

procedure TMainForm.N9Click(Sender: TObject);
begin
     application.CreateForm(TCnDateForm,CnDateForm);
     CnDateForm.showmodal;
     CndateForm.release;
end;

procedure TMainForm.N11Click(Sender: TObject);
begin
     mainform.hide;
     application.Terminate;
end;

procedure TMainForm.N13Click(Sender: TObject);
begin
     winabout('--龙矿集团工资系统 2003',#13+#10+'中心医院范宁波开发--献给我的儿子--范润泽'#13+#10+#13+#10+'联系电话:88--28134');
end;

procedure TMainForm.Panel2MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
{    if datat=nil then
    begin
     Application.CreateForm(TInputForm, InputForm);
     Application.CreateForm(Tdata, data);
     Application.CreateForm(TDataT, DataT);
    end;} 
end;

procedure TMainForm.N27Click(Sender: TObject);
begin
Application.MessageBox('执行本打印程序请按以下步骤:1.双击桌面上的《我的电脑》图标。2.双击《打印机》图标。3.选中某个打印机,单击鼠标右键,单击《属性》。4.选择《纸张》->《自定义》->宽度3454,长度2800,单位0.1毫米。5.单击《确定》退出.注:目前不支持激光打印机.打印纸张规格为381MM.','提示',mb_ok+mb_iconinformation);
end;

procedure TMainForm.N14Click(Sender: TObject);
begin
Application.CreateForm(Tgzt,gzt);
gzt.showmodal;
//gzt.Hide;
//gzt.release;
end;

procedure TMainForm.N16Click(Sender: TObject);
begin
Application.CreateForm(Tksbmxz,ksbmxz);
ksbmxz.showmodal;
ksbmxz.Hide;
ksbmxz.release;
end;

procedure TMainForm.N29Click(Sender: TObject);
begin
Application.CreateForm(Tzhichengxz, zhichengxz);
 zhichengxz.showmodal;
 zhichengxz.Hide;
 zhichengxz.release;
end;

procedure TMainForm.N19Click(Sender: TObject);
begin
Application.CreateForm(Tflbmxz,flbmxz);
flbmxz.showmodal;
flbmxz.Hide;
flbmxz.release;
end;

procedure TMainForm.N26Click(Sender: TObject);
begin
    Application.CreateForm(Ttzhprintform,tzhprintform);
     datat.table6.Open;
     tzhprintform.QuickRep1.Preview;
     tzhprintform.release;
end;

procedure TMainForm.N24Click(Sender: TObject);
begin
Application.CreateForm(Ttcjxz,tcjxz);
     tcjxz.ShowModal;
     tcjxz.Hide;
     tcjxz.release;
end;

procedure TMainForm.N21Click(Sender: TObject);
begin
Application.CreateForm(Ttjxz,tjxz);
     tjxz.ShowModal;
     tjxz.Hide;
     tjxz.release;
end;

procedure TMainForm.N22Click(Sender: TObject);
var ddd:string;
   // kk:integer;
begin
    if printshowform=nil then
       Application.CreateForm(TPrintShowForm, PrintShowForm);

   // kk:=0;
    ddd:='';
    ddd:=password.maskedit1.text+'-'+inttostr(strtoint(password.edit4.text));

    IF  (application.messagebox(pchar('您所选择的打印数据是:  '+ddd+'月,正确吗?'),'消息框',mb_okcancel+mb_defbutton1+mb_iconquestion)
     =idcancel) then  abort;

    data.Query1.Close;
    PrintShowForm.Show;
    PrintShowForm.Label1.Caption:='正在处理数据请稍候...';
    printshowForm.Label1.Update;
    PrintShowForm.Update;

with data.Query1.SQL do
   begin
    PrintShowForm.Label1.Caption:='正在处理数据请稍候...';
    printshowForm.Label1.Update;
    clear;
    add('select * from lyk.dbf');
    add('where riqi='''+ddd+'''');
    add('order by gjm ');
  end;

     data.Query1.Open;

     if data.query1.isempty then
     begin
       ddd:=ddd+'数据不存在,请重新选择日期或者重新生成本月数据!!!';
       printshowform.Hide;
       application.messagebox(pchar(ddd),'消息框',mb_ok+mb_iconinformation);
       data.Query1.Close;
       abort;
     end;//判断数据

     Application.CreateForm(Tgjj, gjj);

     printshowform.Hide;
     gjj.QRLabel3.caption:='月份'+ddd;
     gjj.quickrep1.preview;
     prev.release;

     printshowform.close;
     gjj.release;
end;
procedure TMainForm.N32Click(Sender: TObject);
begin
    application.CreateForm(TGlform,glform);
    GlForm.showmodal;
    glForm.release;
end;

procedure TMainForm.FormResize(Sender: TObject);
begin
   {  mainform.Height:=dsp2.CurrentHeight;
     mainform.Width:=dsp2.CurrentWidth;
     mainform.Left:=0;
     mainform.Top:=0;
     mainform.WindowState:=wsmaximized;}
end;

procedure TMainForm.N20011Click(Sender: TObject);
var ssss:string;
    i:integer;
begin
for i:=1 to 10 do
  begin
    datat.table1.open;
    datat.Table2.Open;
    datat.Table5.Open;
    if i=1 then
    ssss:='jbkk';
    if i=2 then
    ssss:='sj';
    if i=3 then
    ssss:='kg';
    if i=4 then
    ssss:='qt3';
    if i=5 then
    ssss:='qt4';
    if i=6 then
    ssss:='qt5';
    if i=7 then
    ssss:='qt6';
    if i=8 then
    ssss:='ng';
    if i=9 then
    ssss:='bzqt';
    if i=10 then
    ssss:='sjhj'; 

    ssss:='ZJ'+ssss;
    if datat.table1.FindField(ssss)<>nil then
        application.MessageBox(pchar('您已经升级了字段:'+ssss),'提示',mb_ok+mb_iconinformation)
    else
        begin
   //     ok.show;
      data.Query1.Close;
      with data.query1 do
        begin
            if datat.Table1.Active then datat.table1.close;
            with sql do
                 begin
                     datat.table1.close;
                     clear;
                     add('alter table "LYK.dbf" add column');
                     add(ssss);
                     add('NUMERIC(10,2)');
                 end;
            ExecSQL;
       end;

      data.Query1.Close;
      with data.query1 do
        begin
            if datat.Table2.Active then datat.table2.close;
            with sql do
                 begin
                     datat.table2.close;
                     clear;
                     add('alter table "printls.dbf" add column');
                     add(ssss);
                     add('NUMERIC(10,2)');
                 end;
            ExecSQL;
       end;

        data.Query1.Close;
      with data.query1 do
        begin
            if datat.Table5.Active then datat.table5.close;
            with sql do
                 begin
                     datat.table5.close;
                     clear;
                     add('alter table "printtemp.dbf" add column');
                     add(ssss);
                     add('NUMERIC(10,2)');
                 end;
            ExecSQL;
       end;
//信息库增加字段2001-10-12
           data.Query1.Close;
      with data.query1 do
        begin
            if datat.Table5.Active then datat.table5.close;
            with sql do
                 begin
                     datat.table5.close;
                     clear;
                     add('alter table "xxk.dbf" add column');
                     add(ssss);
                     add('NUMERIC(10,2)');
                 end;
            ExecSQL;
       end;
  //     ok.hide;
       end;//else
    end; //for
   datat.table1.close;
   datat.table2.close;
   datat.table5.close;
   data.Query1.Close;
end;





















procedure TMainForm.N97Click(Sender: TObject);
var ddd:string;
   // kk:integer;
begin
    if printshowform=nil then
       Application.CreateForm(TPrintShowForm, PrintShowForm);

  //  kk:=0;
    ddd:='';
    ddd:=password.maskedit1.text+'-'+inttostr(strtoint(password.edit4.text));

    IF  (application.messagebox(pchar('您所选择的打印数据是:  '+ddd+'月,正确吗?'),'消息框',mb_okcancel+mb_defbutton1+mb_iconquestion)
     =idcancel) then  abort;

    data.Query1.Close;
    PrintShowForm.Show;
    PrintShowForm.Label1.Caption:='正在处理数据请稍候...';
    printshowForm.Label1.Update;
    PrintShowForm.Update;

with data.Query1.SQL do
   begin
    PrintShowForm.Label1.Caption:='正在处理数据请稍候...';
    printshowForm.Label1.Update;
    clear;
    add('select * from lyk.dbf');
    add('where riqi='''+ddd+''' and zjqt3>0');
    add('order by zjqt3 ');
  end;

     data.Query1.Open;

     if data.query1.isempty then
     begin
       ddd:=ddd+'数据不存在,请重新选择日期或者重新生成本月数据!!!';
       printshowform.Hide;
       application.messagebox(pchar(ddd),'消息框',mb_ok+mb_iconinformation);
       data.Query1.Close;
       abort;
     end;//判断数据

     Application.CreateForm(Tshj, shj);

     printshowform.Hide;
     shj.QRLabel3.caption:='月份'+ddd;
     shj.quickrep1.preview;
     prev.release;

     printshowform.close;
     shj.release;
end;

procedure TMainForm.N98Click(Sender: TObject);
begin
     Application.CreateForm(Tdataprevshj,dataprevshj);
     dataprevshj.showmodal;
     dataprevshj.Release;
end;

procedure TMainForm.N100Click(Sender: TObject);
begin
     Application.CreateForm(Tdatacurshj,datacurshj);
     datacurshj.showmodal;
     datacurshj.release;
end;

procedure TMainForm.N103Click(Sender: TObject);
var
gl,ng:integer;
begin
with datat.table4 do
begin
open;
first;
DisableControls;
     while not eof do
          begin

              ng:=0;
              gl:=fieldbyname('jt_kl').asinteger;
              if (gl>=0) and (gl<=10) then
              begin
                  ng:=gl*4;
              end;

              if (gl>=11) and (gl<=20) then
              begin
                  ng:=40+(gl-10)*5;
              end;

              if (gl>=21) and (gl<=30) then
              begin
                  ng:=90+(gl-20)*6;
              end;

              if gl>=31  then
              begin
                  ng:=150+(gl-30)*7;
              end;
              edit;
              fieldbyname('zjng').asinteger:=ng;
              fieldbyname('zjbzqt').asfloat:=fieldbyname('jt_7x').asfloat+fieldbyname('jt_hz').asfloat;
              post;
            next;
          end;
EnableControls;
close;
application.MessageBox(pchar('计算完毕!!!'),'提示',mb_ok+mb_iconinformation);

end;

end;

procedure TMainForm.Test21Click(Sender: TObject);
var  I: Integer;
Str,ddd: String;
StrList: TStringList;//用于存储数据的字符列表
begin
     ddd:='';
     ddd:=password.maskedit1.text+'-'+inttostr(strtoint(password.edit4.text));
     data.Query1.Close;
   with data.Query1.SQL do
   begin
      clear;
      add('select * from lyk');
      add('where riqi='''+ddd+'''');
      add('order by name');
   end;
   data.Query1.Open;
StrList := TStringList.Create;
try
with data.query1 do
     begin
     First;
     while not Eof do
     begin
     Str := '';
     for I := 1 to 1 do
     Str := Str + data.query1.Fieldbyname('name').AsString +#9+ data.query1.Fieldbyname('sfe').AsString + #9;  //关键是错在这儿
     StrList.Add(Str);
     Next;
     end;
StrList.SaveToFile(ddd+'上报银行数据.xls');
end;
StrList.Free;
except
StrList.Free;
end;
data.Query1.Close;
showmessage('               导出成功!               位于:'+ExtractFileDir(Application.EXEName));
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -