develop2010 发表于 2011-3-11 15:22:48

U8自定义按钮问题

我在AA_CustomerButton里面插入了一行记录,是在质量管理里面的来料检验单上添加一个联查按钮的。
我在写代码的时候,想通过business对象来做一个联查,我想请问一下,在自定义按钮的代码里面怎样获得business对象?

Public Function RunCommand(ByVal objLogin As Object, ByVal objForm As Object, ByVal objVoucher As Object, _
                            ByVal sKey As String, ByVal VarentValue As Variant, ByVal other As String)
    If DBConn Is Nothing Then
      Set DBConn = New ADODB.Connection
      DBConn.Open objLogin.UfDbName
    End If
   ......................

End Function

dark_trooper 发表于 2018-4-19 18:14:34

同样问题,需要学习一下,我这数据库中没有AA_CustomerButton,这张表,系统11.1

233333ff2233 发表于 2018-11-7 16:32:43

一样的,需要好好的学习

233333ff2233 发表于 2018-11-7 16:32:17

一样的,需要好好的学习

233333ff2233 发表于 2018-11-7 16:31:58

一样的,需要好好的学习

leohh 发表于 2016-11-3 12:43:49

高深的问题
同样求教

zhuyangzhao0602 发表于 2011-3-11 19:44:12

高深的问题
同样求教

691439143 发表于 2011-3-14 12:06:18

一样的,需要好好的学习。

mojianhong 发表于 2011-3-19 11:54:34

我知道如何使用,代码较长,请与我联系!
部分代码如下:
Option Explicit

Implements UFPortalProxyInterface.ILoginable

Public Property Get Business() As Object
    Set Business = g_oBusiness
End Property

'Step 1
Public Property Set Business(ByRef bBus As Object)
    Set g_oBusiness = bBus'获得business对象。
End Property

'Step 2
Public Function ILoginable_Login() As Boolean
    If ((Not g_oBusiness Is Nothing) And g_bLogined = False) Then
      Set g_oLogin = g_oBusiness.GetVBclsLogin() '获得login对象
      g_bLogined = True
      ILoginable_Login = True
    Else
      ILoginable_Login = Not g_oBusiness Is Nothing
    End If
End Function

Public Function ILoginable_LogOff() As Boolean
    '程序退出前,添加自己的代码
    ILoginable_LogOff = True '本行代码必须。
    g_bLogined = False '本行代码必须。
End Function


'Step 3
'CallFunction方法是二次开发程序的入口。即当用户双击二次开发节点时,U8门户会从接口类模块的CallFunction方法开始执行二次开发代码。
Public Function ILoginable_CallFunction(ByVal cMenuId As String, ByVal cMenuName As String, ByVal cAuthId As String, ByVal cCmdLine As String) As Object
    '开始执行业务代码
    'cMenuID、cmenuName、cAuthId、cCmlLine均为前述在UA_Menu表中注册的cMenu_Id、cMenu_Name、cAuth_Id、Paramters字段的值。
    'INSERT INTO UA_Menu(cMenu_Id, cMenu_Name, cSub_Id, IGrade, cSupMenu_Id,bEndGrade, cAuth_Id, iOrder, iImgIndex)
    '            VALUES ('SAM030399', '装箱单*', 'DP', 2, 'SAM0303', 1, 'SAM030399', 0, 4)
    'Columns
      'Column Name            Description                                     Datatype       Length       Allow Nulls
      ' Paramters (U870)       参数,通过commandline,传给调用着            nvarchar       1024         True
      ' Depends (U870)         依赖的产品,如果依赖产品启用,此节点才显示   nvarchar      512         True
      ' Flag (U870)            =1,默认不显示,=8,此产品只支持中文             int            4            True
      ' AutoID (U861)          自动编号                                       int            4            False
      ' cMenu_Id (U861)      菜单编号                                       nvarchar         12         False
      ' cMenu_Name (U861)      菜单名称                                       nvarchar         60         False
      ' cMenu_Eng (U861)       菜单英文名称                                 nvarchar         60         True
      ' cSub_Id (U861)         模块标识                                       nvarchar          2         True
      ' IGrade (U861)          级次                                           smallint          2         True
      ' cSupMenu_Id (U861)   上级菜单编号                                 nvarchar          12          True
      ' bEndGrade (U861)       是否末级                                        bit            1         False
      ' cAuth_Id (U861)         关联功能编号                                 nvarchar         100          True
      ' iOrder (U861)          显示顺序号                                    int            4         False
      ' iImgIndex (U861)       图标索引号                                    int            4         False

shdong340 发表于 2011-3-25 16:37:14

需要好好的学习。

dyo 发表于 2011-3-30 12:48:49

自己实现逻辑。 objVoucher.addnew 貌似可以。

zhangxinchaolc 发表于 2011-7-10 12:01:22

kinseybaby 发表于 2011-7-11 15:30:29

好难哦。。。。。。。

dinghr 发表于 2011-7-22 10:52:57

我也想知道,但我是要用C#.NET开发哦,有哪位大侠知道啊???

dinghr 发表于 2011-7-22 17:02:59

我问下各位大侠,你们在做这块开发时需要引用哪些DLL,这个很重要,但U8安装目录下DLL很多,而且很多DLL不能引用到VB开发环境中,不知道谁知道????主要是单据,窗体,控件,我已经知道U8单据列表控件需要引用U8Voucher(在文件夹ufcomsql下)

zhtliuhao 发表于 2011-8-27 17:18:05

objVoucher 你应该找的是这个对象吧。

隋飞 发表于 2011-8-30 11:14:20

需要好好的学习。

xjy2004 发表于 2012-9-19 11:41:25

这个,要好好研究一下了

lzlcxl 发表于 2012-9-23 01:20:15

学习了,解决了目前遇到的问题,谢谢
页: [1] 2
查看完整版本: U8自定义按钮问题