LiFan
2024-12-17 e3f724c9fd36995c207a6ed173849c20aaa2e3d7
jrj/project/business/Company/HrJob.cpp
@@ -59,9 +59,7 @@
            {
               xstring query = L"[MSSqlHrJob.xq]";
               xml x;
               xaserverarg arg;
               arg.AddArg(L"type", m_type);
               //if (xaserver::ExecXQuery(GetServerUrl(),query,arg.GetString(),x)!=1)
               if (xurl::post(L"OrganizationStruct/list.Job", arg.GetString(), x) != 1)
@@ -81,12 +79,12 @@
            int OnTreeSelChanged(TEvent* evt, int p)
            {
               NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh;
               HTREEITEM hItem = nmtv.itemNew.hItem;
               //HTREEITEM hItem = nmtv.itemNew.hItem;
               //int wid = tv_1.GetId();
               HTREEITEM hItem = tv_1.GetSelectedItem();
               HTREEITEM rootItem = tv_1.GetRootItem();
               if (hItem <= 0 || hItem == rootItem)
               if (!hItem || hItem == rootItem)
               {
                  m_type = L"all";
               }
@@ -108,14 +106,17 @@
               KXMLDOMElement ele = x.selectSingleNode(L"Type");
               HTREEITEM hItem = tv_1.InsertChildItemEx(0, L"工种类型", ele, 15, 4);
               KXMLDOMElement e1 = tv_1.GetItemData(hItem);
               string str = e1.xml();
               if (xurl::post(L"/sale/data/OrganizationStruct/type.Job", L"", x) != 1)
               {
                  trace(x.xml());
                  return -1;
               }
               //trace(x.GetXml());
               var list = x.selectNodes(L"//Type");
               int i = 0, s = list.length;
               auto list = x.selectNodes(L"//Type");
               int i = 0, s = list.length();
               KXMLDOMElement e;
               xstring sname;
               if (s > 0)
@@ -269,8 +270,7 @@
            int onload()
            {
               m_type = L"all";
               tv_1 = new treeview;
               tv_1.setNativePointer(GetControl(L"tv_1"));
               tv_1 = GetControl(L"tv_1");
               dw_list = new xdwgrid;
               dw_list.setNativePointer(GetControl(L"dw_list"));
               dw_list.openUrl(L"组织架构.vface/template/HrJob/list");