| | |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | #include "hremployee.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) HrEmployeeAdd : public xframe |
| | | { |
| | | public: |
| | | HrEmployee lw_obj; |
| | | HrEmployee* lw_obj; |
| | | xdwgrid dw_list; |
| | | |
| | | xnode m_agentNode; //Agent Condition |
| | |
| | | |
| | | int OnRetrieve() |
| | | { |
| | | control xc = new control; |
| | | xc.setNativePointer(GetControl(L"QueryTxt")); |
| | | xcontrol xc = GetControl(L"QueryTxt"); |
| | | m_sTxt = xc.GetText() + L""; |
| | | xml x ; |
| | | |
| | |
| | | |
| | | int OnOK() |
| | | { |
| | | if (GetParam()) |
| | | if (GetWinParam()) |
| | | { |
| | | lw_obj = new HrEmployee; |
| | | lw_obj.setNativePointer(GetParam()); |
| | | lw_obj = GetParam(); |
| | | lw_obj = (HrEmployee*)GetWinParam(); |
| | | } |
| | | else |
| | | return 0; |
| | |
| | | xstring sPositionID, sPositionName; |
| | | xstring sOrgID, sOrgName; |
| | | xstring sJobID, sJobName; |
| | | int wid = lw_obj.tv_org.GetId(); |
| | | int hitem = treeview::GetSelectedItem(wid); |
| | | KXMLDOMElement ele = treeview::GetItemData(wid, hitem); |
| | | KXMLDOMElement ele = lw_obj->tv_org.GetItemData(lw_obj->tv_org.GetSelectedItem()); |
| | | if (ele) |
| | | { |
| | | sPositionID = ele.selectSingleNode(L"id").text(); |
| | |
| | | while (row > 0) |
| | | { |
| | | KXMLDOMElement e = dw_list.GetRowElement(row); |
| | | xstring sEmployeeNo = e.selectSingleNode(L"EmployeeNo").text + L""; |
| | | xstring sPersonID = e.selectSingleNode(L"PersonID").text + L""; |
| | | xstring sPersonName = e.selectSingleNode(L"Name").text + L""; |
| | | xstring sEmployeeNo = e.selectSingleNode(L"EmployeeNo").text(); |
| | | xstring sPersonID = e.selectSingleNode(L"PersonID").text(); |
| | | xstring sPersonName = e.selectSingleNode(L"Name").text(); |
| | | |
| | | int nRow = lw_obj.dw_emp.InsertRow(0); |
| | | lw_obj.dw_emp.SetItemString(nRow, L"EmployeeNo", sEmployeeNo); |
| | | lw_obj.dw_emp.SetItemString(nRow, L"PersonID", sPersonID); |
| | | lw_obj.dw_emp.SetItemDisplayString(nRow, L"PersonID", sPersonName); |
| | | int nRow = lw_obj->dw_emp.InsertRow(0); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"EmployeeNo", sEmployeeNo); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"PersonID", sPersonID); |
| | | lw_obj->dw_emp.SetItemDisplayString(nRow, L"PersonID", sPersonName); |
| | | |
| | | lw_obj.dw_emp.SetItemString(nRow, L"PositionID", sPositionID); |
| | | lw_obj.dw_emp.SetItemDisplayString(nRow, L"PositionID", sPositionName); |
| | | lw_obj.dw_emp.SetItemString(nRow, L"OrgID", sOrgID); |
| | | lw_obj.dw_emp.SetItemDisplayString(nRow, L"OrgID", sOrgName); |
| | | lw_obj.dw_emp.SetItemString(nRow, L"JobID", sJobID); |
| | | lw_obj.dw_emp.SetItemDisplayString(nRow, L"JobID", sJobName); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"PositionID", sPositionID); |
| | | lw_obj->dw_emp.SetItemDisplayString(nRow, L"PositionID", sPositionName); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"OrgID", sOrgID); |
| | | lw_obj->dw_emp.SetItemDisplayString(nRow, L"OrgID", sOrgName); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"JobID", sJobID); |
| | | lw_obj->dw_emp.SetItemDisplayString(nRow, L"JobID", sJobName); |
| | | |
| | | lw_obj.dw_emp.SetItemString(nRow, L"Status", L"Y"); |
| | | lw_obj.dw_emp.SetItemDisplayString(nRow, L"Status", L"有效"); |
| | | xstring sdate = publiccode::GetCurDate() + L""; |
| | | lw_obj.dw_emp.SetItemString(nRow, L"StartDate", sdate + L""); |
| | | lw_obj.dw_emp.SetItemString(nRow, L"EndDate", L"2050-12-31"); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"Status", L"Y"); |
| | | lw_obj->dw_emp.SetItemDisplayString(nRow, L"Status", L"有效"); |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"StartDate", sdate); |
| | | lw_obj->dw_emp.SetItemString(nRow, L"EndDate", L"2050-12-31"); |
| | | |
| | | row = dw_list.GetNextSelectRow(row + 1); |
| | | } |
| | |
| | | |
| | | return 1; |
| | | } |
| | | ] |
| | | |
| | | ] |
| | | ] |
| | | }; |