fastscript增加公共函数

unit fs_BsCommFuncs;

interface
{$i fs.inc}
uses
SysUtils, Classes, fs_iclassesrtti, fs_iinterpreter,fs_ipascal;
type
TBsCommFunctions = class(TfsRTTIModule)
private
function CallMethod(Instance: TObject; ClassType: TClass;
const MethodName: String; Caller: TfsMethodHelper): Variant;
public
constructor Create(AScript: TfsScript); override;
end;
VAR BsCommFunctions:TBsCommFunctions;
implementation
uses MainModule,Bs_BaseList,Bs_BaseEdit,Bs_Math,uniPageControl;

function GetUserCode():string; //获取用户代码
var tempMainModule:TUniMainModule;
begin
Result := '';
tempMainModule := UniMainModule;
Result := tempMainModule.FuserCode;
end;

function Get_GUID(): string;
begin
Result := GetGUID;
end;

constructor TBsCommFunctions.Create(AScript: TfsScript);
begin
inherited Create(AScript);
with AScript do
begin
//--------------模块接口方法--------//
AddMethod('function var_UserCode():string', CallMethod);
AddMethod('function GetGUID():string', CallMethod);

AddMethod('procedure ShowListA(QModueleCode:string;QTabSheet:TUniTabSheet)',CallMethod);
AddMethod('procedure BaseEditA(QModueleCode:string;QKeyValue:string)',CallMethod);
end;
end;

function TBsCommFunctions.CallMethod(Instance: TObject; ClassType: TClass;
const MethodName: String; Caller: TfsMethodHelper): Variant;
begin
if MethodName='VAR_USERCODE' then
Result := GetUserCode()
else
if MethodName='GETGUID' then
Result := Get_GUID()
else
if MethodName='SHOWLISTA' then
ShowList_A(Caller.Params[0],TUniTabSheet(Integer(Caller.Params[1])))
else
if MethodName='BASEEDITA' then
BaseEdit_A(Caller.Params[0],Caller.Params[1])
end;

end.

fastscript增加公共函数的更多相关文章

  1. Postman高级应用——流程控制、调试、公共函数、外部数据文件

    postman客户端下载地址:https://www.getpostman.com/apps 目录 流程控制 调试 公共函数 外部数据文件 流程控制 流程控制简言之就是设置接口的执行顺序,流程控制只有 ...

  2. phpcms公共函数库 总结

    *  global.func.php 公共函数库 /** * 返回经addslashes处理过的字符串或数组 * @param $string 需要处理的字符串或数组 * @return mixed ...

  3. fastscript增加三方控件

    fastscript增加三方控件 A.关于如何使用第三方控件,增加方法.属性.事件)举例如下: 如:有一控件为edtbutton:TedtButton,我们需要在动态脚本中使用该控件.我们采用如下方法 ...

  4. cmf公共函数解析

    cmf公共函数解析-common.php 路径:thinkcmf\simplewind\cmf\common.php方法: 方法 作用 返回值 cmf_get_current_admin_id    ...

  5. ThinkPHP 3.2.3 自动加载公共函数文件的方法

    方法一.加载默认的公共函数文件 在 ThinkPHP 3.2.3 中,默认的公共函数文件位于公共模块 ./Application/Common 下,访问所有的模块之前都会首先加载公共模块下面的配置文件 ...

  6. CodeIgniter 引入自定义公共函数

    CodeIgniter 中公共函数不能追加,可以通过 helper 辅助函数实现. 创建 common_helper.php 文件,定义所需公共函数,存放至 application/helpers 目 ...

  7. ThinkPHP第三天(公共函数Common加载,dump定义,模板文件,定义替换__PUBLIC__)

    1.公共函数定义 自动加载:在项目的common文件夹中定义,公共函数文件命名规则为common.php,只有命名成common.php才能被自动载入. 动态加载:可以修改配置项‘LOAD_EXT_F ...

  8. 【ASP.NET】怎样使用类创建公共函数,在不同ASP.NET页面间反复调用

    为了降低代码冗余,应将公共函数写在类中,供不同ASP.NET页面调用. 1,先新建一个类,并在类中加入函数逻辑 namespace public_function_demo { public clas ...

  9. postman定义公共函数

    对于postman定义公共函数,相信很多小伙伴并不是很了解,下面给大家带来了一点福利,一起来看看吧.1.判断是否超时(assertNotTimeout)

随机推荐

  1. Linux学习-检验软件正确性

    md5sum / sha1sum / sha256sum 目前有多种机制可以计算文件的指纹码,我们选择使用较为广泛的 MD5, SHA1 或 SHA256 加密机 制来处理,我们拿NTP 软件来检查看 ...

  2. luogu1233 木棍加工

    先排个序然后做最长上升子序列就行了. #include <algorithm> #include <iostream> #include <cstdio> usin ...

  3. 程序员必需知道的windows快捷键

    系统操作的快捷键 1.F5------刷新 2.window+E------打开我的电脑 3.window+r------打开运行 4.window+l------快速锁机 5.window+d--- ...

  4. day01_01.了解php

    1.了解PHP 第一个程序 echo 'hello world'; 和python的区别,python是 print (hello world) 并且python结尾没有;2.X版本不需要加括号,但是 ...

  5. configparser模块——用于生成和修改常见配置文档

    配置文档格式 [DEFAULT] ServerAliveInterval = 45 Compression = yes CompressionLevel = 9 ForwardX11 = yes [b ...

  6. [windows篇][关掉某些服务]

  7. 连通图 poj2186 最受欢迎的牛(求最受欢迎的牛的数量)

    Popular Cows Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 27531   Accepted: 11077 De ...

  8. Python3网络爬虫(三):urllib.error异常

    运行平台:Windows Python版本:Python3.x IDE:Sublime text3 转载请注明作者和出处:http://blog.csdn.net/c406495762/article ...

  9. oracle列转行 WM_CONCAT LISTAGG

    开发给个SQL说给某个条件时报ORA-22922 代码段: SELECT 袋号, SUM(实际重量) AS 实际重量, SUM(材积重量) AS 材积重量, COUNT(运单号) AS 件数, TO_ ...

  10. pip安装 Tensorflow 安装包

    最简单的 Tensorflow 的安装方法是在 pip 一键式安装官方预编译好的包 pip install tensorflow通常这种预编译的包的编译参数选择是为了最大兼容性而不是为了最优性能,导致 ...