From 8974271490c20a66ce5c6d898bcce1c04310cf9c Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期三, 10 七月 2024 11:59:02 +0800
Subject: [PATCH] update
---
jrj/project/business/SO3.list.cpp | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/jrj/project/business/SO3.list.cpp b/jrj/project/business/SO3.list.cpp
index f5af146..8f92f1c 100644
--- a/jrj/project/business/SO3.list.cpp
+++ b/jrj/project/business/SO3.list.cpp
@@ -46,9 +46,9 @@
if (len > 0) tv_folder.SetItemChild(hItem, 1);
for (int i = 0; i < len; i++)
{
- KXMLDOMElement& e = * new KXMLDOMElement(nlist.item(i));
+ KXMLDOMElement e = nlist.item(i);
string name = e.getAttribute(L"name");
- HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image);
+ HTREEITEM h = tv_folder.InsertChildItem(hItem, name, e, image);
ExpandCatChildFolder(h, e, 35);
}
return 1;
@@ -62,9 +62,9 @@
int len = nlist.length();
for (int i = 0; i < len; i++)
{
- KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i));
+ KXMLDOMElement e = nlist.item(i);
string name = e.getAttribute(L"name");
- HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, 35);
+ HTREEITEM h = tv_folder.InsertChildItem(hItem, name, e, 35);
ExpandCatChildFolder(h, e, 35);
}
return 1;
@@ -79,7 +79,7 @@
string name = tv_folder.GetItemLabel(hTopItem);
HTREEITEM child = tv_folder.GetChildItem(hItem);
- KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder.GetItemData(hItem);
+ KXMLDOMElement e = tv_folder.GetItemData(hItem);
if (!child)ExpandFolderItem(hItem, e.getAttribute(L"no"));
return 1;
@@ -92,15 +92,15 @@
int len = nlist.length();
for (int i = 0; i < len; i++)
{
- KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i));
+ KXMLDOMElement e = nlist.item(i);
string name = e.getAttribute(L"name");
xstring sImage = e.getAttribute(L"image");
xstring child = e.getAttribute(L"child");
int image = 15;
if (sImage) image = sImage.toInt();
- HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image);
+ HTREEITEM h = tv_folder.InsertChildItem(hItem, name, e, image);
if (child != L"no") tv_folder.SetItemChild(h, 1);
- ExpandChildFolder(h, e);
+ //ExpandChildFolder(h, e);
}
return 1;
}
@@ -143,8 +143,8 @@
dw_list.SetItemString(row, L"ApplyStatus", arg.GetArgString(L"state"));
if (arg.GetArgString(L"billstatus") != L"")
{
- string billstatus = arg.GetArgString(L"billstatus");
- string statusName = GetBillStatusName(billstatus);
+ xstring billstatus = arg.GetArgString(L"billstatus");
+ xstring statusName = GetBillStatusName(billstatus);
dw_list.SetItemString(row, L"ApprovalStatus", billstatus);
dw_list.SetItemDisplayString(row, L"ApprovalStatus", statusName);
}
@@ -170,7 +170,7 @@
if (!hItem) return 1;
HCURSOR hCursor = xutil::SetCursorWait();
- KXMLDOMElement& e1 = *(KXMLDOMElement*)tv_folder.GetItemData(hItem);
+ KXMLDOMElement e1 = tv_folder.GetItemData(hItem);
string no = e1.getAttribute(L"no");
KXMLDOMDocument x = ViewObject::RetrieveData(GetServerUrl(),myDataUrl, L"no", no, L"QueryTxt", m_QueryTxt, L"rows", rows);
if (x)
@@ -285,12 +285,12 @@
return 1;
}
- int PreOnCmdDispatch(string comdid)
+ int PreOnCmdDispatch(xstring comdid)
{
if (comdid == L"action:bill.new")
{
- string s = publiccode::GetUser().id;
- string no = publiccode::GetUser().no;
+ xstring s = publiccode::GetUser().id;
+ xstring no = publiccode::GetUser().no;
if (no != L"00303" && no != L"admin")
{
KXMLDOMDocument supplier_x = ViewObject::RetrieveData(GetServerUrl(),L"/sale/data/SupplierV3/entity/FindBySaleType", L"id", s);
@@ -306,7 +306,7 @@
}
if (comdid == L"action:bill.annex")
{
- string deptname = publiccode::GetUser().deptname;
+ xstring deptname = publiccode::GetUser().deptname;
if (deptname == L"采购部")
{
return 1;
@@ -406,7 +406,7 @@
{
AttachEvent(L"tv_folder", L"TVN_SELCHANGED", (FEvent)&SO3list::OnTreeSelChanged); //树选择
AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&SO3list::OnRowChanged);//绑定行更改触发事件OnRowChanged
- AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&listwin::OnDoubleClicked);
+ //AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&listwin::OnDoubleClicked);
AttachEvent(L"cbx_1", L"CBN_SELCHANGE", (FEvent)&SO3list::OnSelectDdlb);//绑定下拉框更改触发事件OnSelectDdlb
AttachEvent(L"cbx_datashow", L"CBN_SELCHANGE", (FEvent)&SO3list::OnSelectDataShowDdlb);//绑定选择数据显示下拉列表事件OnSelectDataShowDdlb
return 1;
@@ -499,7 +499,7 @@
{
HTREEITEM hItem = tv_folder.GetCaretItem();
if (hItem ) return 1;
- KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder.GetItemData(hItem);
+ KXMLDOMElement e = tv_folder.GetItemData(hItem);
xstring no = e.getAttribute(L"no");
if (no.find(L"Customer:") >= 0)
{
--
Gitblit v1.9.3