|  |  | 
 |  |  | #include "viewobject/view.base.hpp" | 
 |  |  |  | 
 |  |  | using xml = KXMLDOMDocument; | 
 |  |  | class __declspec(dllexport) FCL : public xframe | 
 |  |  | class __declspec(dllexport) FCL : public listwin | 
 |  |  | { | 
 |  |  | public: | 
 |  |  |    xcombobox ddlb_1; | 
 |  |  | 
 |  |  |    xstring m_config; | 
 |  |  |    xstring m_spec; | 
 |  |  | public: | 
 |  |  |    FCL(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} | 
 |  |  |    FCL(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {} | 
 |  |  | public: | 
 |  |  |    static FCL* CreateInstance(void* implPtr, void* hWnd) | 
 |  |  |    { | 
 |  |  | 
 |  |  |    { | 
 |  |  |       xaserverarg arg; | 
 |  |  |  | 
 |  |  |       xdwpages zz = new xdwpages; | 
 |  |  |       zz.setNativePointer(GetControl(L"pages")); | 
 |  |  |       xdwpages zz = GetControl(L"pages"); | 
 |  |  |       xml x; | 
 |  |  |  | 
 |  |  |       getUrl(L"/sale/data/FCL/entity/list", arg.GetString(), x); | 
 |  |  | 
 |  |  |    } | 
 |  |  |    int SetCellEdit(int row, xstring name, xstring value, xstring display) | 
 |  |  |    { | 
 |  |  |       dw_base.SetItemString(row, name, value); | 
 |  |  |       dw_base.SetItemString(row, name.c_str(), value); | 
 |  |  |       dw_base.Redraw(); | 
 |  |  |       if (display != L"") | 
 |  |  |       { | 
 |  |  |          dw_base.SetItemDisplayString(row, name, display); | 
 |  |  |          dw_base.SetItemDisplayString(row, name.c_str(), display); | 
 |  |  |       } | 
 |  |  |       dw_base.AcceptText(); | 
 |  |  |       dw_base.ResetUpdateStatus(); | 
 |  |  | 
 |  |  |       dw_base.AcceptText(); | 
 |  |  |       SetPriceBaseEmpty(); | 
 |  |  |       KXMLDOMElement e = dw_list.GetRowElement(row); | 
 |  |  |       var list = e.selectNodes(L"*"); | 
 |  |  |       auto list = e.selectNodes(L"*"); | 
 |  |  |       if (list) | 
 |  |  |       { | 
 |  |  |          int s = list.length; | 
 |  |  |          int s = list.length(); | 
 |  |  |          int i; | 
 |  |  |          for (i = 0; i < s; i++) | 
 |  |  |          { | 
 |  |  | 
 |  |  |  | 
 |  |  |       dw_list.DwUpdateAllToEx(x); | 
 |  |  |       trace(x.xml()); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |    int OnDeleteRow() | 
 |  |  |    { | 
 |  |  |       int row = dw_list.GetRow(); | 
 |  |  |       if (row<1 || row>dw_list.GetRowCount()) | 
 |  |  |       { | 
 |  |  |          return -1; | 
 |  |  |       } | 
 |  |  |       dw_list.DeleteRow(row); | 
 |  |  |  | 
 |  |  |    } | 
 |  |  |    int OnAddrow() | 
 |  |  |    { | 
 |  |  |       int row = dw_list.InsertRow(0); | 
 |  |  |       dw_list.SetItemString(row, L"modifieddate", TApp::GetCurDate()); | 
 |  |  |       dw_list.SetItemString(row, L"modifieddate", publiccode::GetCurrentDate()); | 
 |  |  |       SetPriceBaseEmpty(); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  | 
 |  |  |       int row = dw_list.GetRow(); | 
 |  |  |       if (row < 1) return 0; | 
 |  |  |       int newrow = dw_list.InsertRow(row); | 
 |  |  |       dw_list.SetItemString(newrow, L"modifieddate", TApp::GetCurDate()); | 
 |  |  |       dw_list.SetItemString(newrow, L"modifieddate", publiccode::GetCurrentDate()); | 
 |  |  |       SetPriceBaseEmpty(); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int OnDeleteRow() | 
 |  |  |    { | 
 |  |  |       int row = dw_list.GetRow(); | 
 |  |  | 
 |  |  |       } | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int OnCmdDispatch(xstring comdid) | 
 |  |  |    { | 
 |  |  |       if (comdid.find(L"add", 0) >= 0) | 
 |  |  | 
 |  |  |    } | 
 |  |  |    int OnInit() | 
 |  |  |    { | 
 |  |  |       dw_list = new xdwgrid; | 
 |  |  |       dw_list.setNativePointer(GetControl(L"dw_list")); | 
 |  |  |       dw_list = GetControl(L"dw_list"); | 
 |  |  |       dw_list.openUrl(L"/sale/view/FCL/template/FCL/List"); | 
 |  |  |       dw_base = new xdwtable; | 
 |  |  |       dw_base.setNativePointer(GetControl(L"dw_base")); | 
 |  |  |       dw_base = GetControl(L"dw_base"); | 
 |  |  |       dw_base.openUrl(L"/sale/view/FCL/template/FCL/pricebase"); | 
 |  |  |       dw_list.SetReadOnlyColumn(L"shipthread", true); | 
 |  |  |       dw_list.SetReadOnlyColumn(L"price20", true); |