xj qian
2024-06-25 58c129e8f21f79396a822eaeadd78edf281b52a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#pragma once
 
#include <wobject/xstring.hpp>
#include <wobject/xaserverarg.hpp>
#include <win32/win.hpp>
#include <vbusiness/vutil/publiccode.vutil.vbusiness.hpp>
#include <wobject/xurl.hpp>
#include <xcontrol/xdwgrid.hpp>
#include <xcontrol/xdwtable.hpp>
#include <view.base.hpp>
 
class ProductLibraryView: public ViewObject
{
public:
    //form
    static KXMLDOMDocument  GetMaintListForm(string no)
    {
        return RetrieveData(L"/sale/data/ProductLibrary/maint/listform",L"refno",no);
    }
public:
    static KXMLDOMDocument  GetMaintList(string no)
    {
        return RetrieveData(L"/sale/data/ProductLibrary/data/list",L"parent",no);
    }
    
    //读取树的子项
    static KXMLDOMDocument  GetTreeChildItems(string sno)
    {
        return RetrieveData(L"/sale/data/ProductLibrary/ChildFolderList",L"no",sno);
    }
public:
    //删除商品项
    static int DeleteItem(string id)
    {
        //if(RetrieveData(L"/sale/data/SO/goods/usegoods/delete",L"guid",id)) return 1;
        string str = "<Item update.modify='1' update.delete='1' guid='"+id+L"'/>";
        if(RetrieveData(L"/sale/data/ProductLibrary3/update/product",L"content",str)) return 1;
        return -1;
    }
public:
    xml  GetGoodsPropList(string guid)
    {
        return RetrieveData(L"/sale/data/SO/goods/goodsprop/list",L"guid", guid);
    }
    
public:
    //form
    static KXMLDOMDocument  GetMaintListForm3(string CategoryID)
    {
        return RetrieveData(L"/sale/data/ProductLibrary3/maint/listform",L"CategoryID",CategoryID);
    }
    
    //读取树的子项
    static KXMLDOMDocument  GetTreeChildItems3(string CategoryID)
    {
        return RetrieveData(L"/sale/data/ProductLibrary3/ChildFolderList",L"CategoryID",CategoryID);
    }
    
    //读取树的子项
    static KXMLDOMDocument  GetTreeUserChildItems3(string CategoryID)
    {
        //return RetrieveData(L"/sale/data/ProductLibrary3/User/ChildFolderList",L"CategoryID",CategoryID);
        return RetrieveData(L"/sale/data/ProductLibrary3/User/ChildFolderList",L"CategoryID",CategoryID);
    }
    
    static KXMLDOMDocument  GetMaintList3(string CategroyID)
    {
        return RetrieveData(L"/sale/data/ProductLibrary3/data/list",L"CategoryID",CategroyID);
    }
    
    static KXMLDOMDocument  GetMaintList3(string CategroyID,string QueryText,string QueryArg)
    {
        return RetrieveData(L"/sale/data/ProductLibrary3/data/listex",L"CategoryID",CategroyID,L"QueryText",QueryText,L"QueryArg",QueryArg);
    }
    
    static KXMLDOMDocument  GetMaintRoleList3(string CategroyID)
    {
        return RetrieveData(L"/sale/data/ProductLibrary3/role/data/list",L"CategoryID",CategroyID);
    }
    
    static KXMLDOMDocument  GetMaintRoleList3(string CategroyID,string QueryText)
    {
        return RetrieveData(L"/sale/data/ProductLibrary3/role/data/listex",L"CategoryID",CategroyID,L"QueryText",QueryText);
    }
};