📄 sldata.pas
字号:
end;
dbgrids.Perform(WM_SetRedraw, 1, 0);
dbgrids.Repaint;
sl_data.querys.First;
end;
end;
function Tsl_data.getviewhtml(id:integer;outhtml:tstringlist):boolean;
var i:integer;
begin
result:=false;
if querys.RecordCount>0 then
begin
outhtml.add('<HTML>');
outhtml.add('<HEAD>');
outhtml.add('<meta name="xword" content="乐宝时光">');
outhtml.add('<TITLE>工资管理--信息查看</TITLE>');
outhtml.add('<link rel="stylesheet" href="css/all.css">');
outhtml.add('</HEAD>');
outhtml.add('<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" align="center">');
outhtml.Add('<table border="0" width="99%" cellspacing=1 cellpadding=4 align=center bgcolor=41b1e3>');
outhtml.add('<tr align=center ><td>当前页:</td>');
outhtml.add('<td>'+inttostr(querys.RecNo)+'/'+inttostr(querys.RecordCount)+'</td></tr>');
for i:=1 to querys.FieldCount do
begin
outhtml.add('<tr align=center bgcolor=ffffff>');
outhtml.add('<td >'+getfieldtobgname(id,querys.FieldList.Strings[i-1])+'</td>');
outhtml.add('<td>'+querys.Fields[i-1].AsString+'</td>');
outhtml.add('</tr>');
end;
outhtml.add('</table>');
outhtml.add('</body>');
outhtml.add('</html>');
result:=true;
end;
end;
//******************************************************************************
//系统设置, 打印,公司信息..
//******************************************************************************
function Tsl_data.sysother_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.sysother_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
function Tsl_data.sfztosheng(s:string):string;
var msg:string;
begin
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_sysother)));
add(makeparams('funid',inttostr(public_list_sub)));
add(makeparams('tuid',s));
msg:=text;
finally
free;
end;
sl_data.querysinfo.Data:=sl_data.querysinfo.DataRequest(msg);
if sl_data.querysinfo.recordcount=1 then
result:=sl_data.querysinfo['area'];
end;
procedure tsl_data.getcompanyinfo;
var msg:string;
begin
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_sysother)));
add(makeparams('funid',inttostr(public_infor)));
msg:=text;
finally
free;
end;
sl_data.querysinfo.Data:=sl_data.querysinfo.DataRequest(msg);
if sl_data.querysinfo.recordcount=1 then
begin
company_name:=sl_data.querysinfo['pname'];
company_tel:=sl_data.querysinfo['tel'];
company_fax:=sl_data.querysinfo['fax'];
company_mail:=sl_data.querysinfo['mail'];
company_web:=sl_data.querysinfo['web'];
company_adder:=sl_data.querysinfo['adder'];
company_other:=sl_data.querysinfo['other'];
end;
end;
//******************************************************************************
//帐号管理
//******************************************************************************
function Tsl_data.user_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.user_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
{返回用户列表}
procedure Tsl_data.getuserlist(box1:tstrings);
var i:integer; msg:string;
begin
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_user)));
add(makeparams('funid',inttostr(public_list)));
msg:=text;
finally
free;
end;
querysinfo.Data:=querysinfo.DataRequest(msg);
if querysinfo.RecordCount>0 then
for i:=1 to querysinfo.recordcount do
begin
box1.Add(querysinfo['userid']);
querysinfo.Next;
end;
end;
{返回帐号权限}
function Tsl_data.getuserinfo(s:string):string;
var msg:string;
begin
result:=authority_blank;
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_user)));
add(makeparams('funid',inttostr(public_infor)));
add(makeparams('tuid',s));
msg:=text;
finally
free;
end;
querysinfo.Data:=querysinfo.DataRequest(msg);
if querysinfo.RecordCount=1 then
result:=querysinfo['authority'];
end;
{密码验证}
function Tsl_data.checkpassword(s1,s2:string):boolean;
var msg:string;
begin
with tstringlist.create do
try
add(makeparams('tuid',s1));
add(makeparams('tpwd',md5encode(s1+s2)));
msg:=text;
finally
free;
end;
sldcom.AppServer.user_model(inttostr(private_check_passwd),msg);
result:=checkresult;
end;
//******************************************************************************
//部门管理
//******************************************************************************
function tsl_data.dept_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.dept_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
{返回部门列表.}
procedure tsl_data.getdeptlist(box1:tstrings);
var i:integer; msg:string;
begin
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_dept)));
add(makeparams('funid',inttostr(public_list)));
msg:=text;
finally
free;
end;
querysinfo.Data:=querysinfo.DataRequest(msg);
if querysinfo.RecordCount>0 then
for i:=1 to querysinfo.recordcount do
begin
box1.Add(querysinfo['dept']);
querysinfo.Next;
end;
end;
{返回工种列表}
procedure tsl_data.getworktypelist(box1:tstrings;s:String);
var i:integer; msg:string;
begin
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_dept)));
add(makeparams('funid',inttostr(public_infor)));
add(makeparams('tuid',s));
msg:=text;
finally
free;
end;
querysinfo.Data:=querysinfo.DataRequest(msg);
if querysinfo.RecordCount>0 then
for i:=1 to querysinfo.recordcount do
begin
box1.Add(querysinfo['work_type']);
querysinfo.Next;
end;
end;
//******************************************************************************
//宿舍管理
//******************************************************************************
function tsl_data.dormitory_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.dormitory_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
procedure tsl_data.getbromlist(box1:tstrings);
var msg:string;
i:integer;
begin
with tstringlist.create do
try
add(makeparams('operid',inttostr(Query_dormitory)));
add(makeparams('funid',inttostr(public_list_ex01)));
msg:=text;
finally
free;
end;
querysinfo.data:=querysinfo.DataRequest(msg);
if querysinfo.RecordCount>0 then
for i:=1 to querysinfo.recordcount do
begin
box1.add(querysinfo['room_num']);
querysinfo.next;
end;
end;
//******************************************************************************
//员工,新进,离职管理
//******************************************************************************
function tsl_data.Parchives_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.Parchives_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
//******************************************************************************
// 事件提示
//******************************************************************************
function tsl_data.event_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.event_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
//******************************************************************************
// 税率表
//******************************************************************************
function tsl_data.cess_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.cess_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
//******************************************************************************
// 医疗保险
//******************************************************************************
function tsl_data.medicare_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.medicare_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
//******************************************************************************
// 养老保险
//******************************************************************************
function tsl_data.insurance_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.insurance_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
//******************************************************************************
// 个人所得税
//******************************************************************************
function tsl_data.incometax_model(funid:integer;msg:string):boolean;
begin
sldcom.AppServer.incometax_model(inttostr(funid),msg);
result:=checkresult;
if not result then showmessage(sldcom.appserver.lasterrormsg);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -