| | |
| | | xdwtable dw_base;//新增弹窗时使用 |
| | | xstring mfid; |
| | | xnode m_agentNode; //Agent Condition |
| | | bool updated; |
| | | |
| | | xstring UserNo; |
| | | public: |
| | | ViewManpowerFileWiondow(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | public: |
| | |
| | | //保存数据 |
| | | int OnSave() |
| | | { |
| | | xml x = new xml; |
| | | xml x ; |
| | | |
| | | dw_base.AcceptText(); |
| | | dw_base.DwUpdateAllTo(x); |
| | | xaserverarg arg; |
| | | arg.setNativePointer(xaserverarg::CreateInstance()); |
| | | |
| | | arg.AddArg(L"content", x.xml()); |
| | | //trace(x.xml()); |
| | | if (xurl::get(L"/sale/data/ManpowerFile/update", arg.GetString(), x) != 1) |
| | |
| | | //获取焦点事件,用于重置工具条 |
| | | AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewManpowerFileWiondow::OnSetFocus); |
| | | AttachEvent(L"dw_base", L"DWV_ITEMCHANGING", (FEvent)&ViewManpowerFileWiondow::OnItemChanging); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | int OnItemChanging(TEvent* evt, LPARAM p) |
| | |
| | | xstring colname = hdr.colname; |
| | | xstring value = hdr.data; |
| | | int row = hdr.row; |
| | | #if 0 |
| | | |
| | | |
| | | |
| | | if (value == L"") return 1; |
| | | xstring cellType = dw_base.GetColumnProp(colname, L"celltype"); |
| | |
| | | return 1; |
| | | } |
| | | } |
| | | #endif // 0 |
| | | return 1; |
| | | } |
| | | |
| | | int OnRetrieve() |
| | | { |
| | | xml x = new xml; |
| | | xml x ; |
| | | |
| | | xaserverarg arg; |
| | | |
| | |
| | | |
| | | int onload() |
| | | { |
| | | //SetArg(); |
| | | dw_base = GetControl(L"dw_base"); |
| | | dw_base.openUrl(L"/sale/view/ManpowerFile/template/win"); |
| | | mfid = L""; |
| | |
| | | dw_base.SetRowSelectorWidth(0); |
| | | dw_base.SetHScrollState(false); |
| | | dw_base.SetVScrollState(false); |
| | | |
| | | OnAttachEvent(); |
| | | |
| | | UserNo = publiccode::GetUser().name; |
| | | |
| | | if (UserNo.find(L"周冉") >= 0) { |
| | | dw_base.SetItemString(1, L"Position", L"周冉"); |
| | | } |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |