Jump to content

55143681

uniGUI Subscriber
  • Posts

    670
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 55143681

  1. Oh,UniDAC new version cause the problem. In my project,I like set UniQuery's fetchRows=65535, then I have the error, If I change the parameter to 25, It works well.
  2. Maybe that is UniDAC's bug.
  3. Shezod: It seems that my UniQuery2 can not select too many fields,otherwise it will give me an error "Out of memory" you can see,If I only select 5 fields,it works well, but if I select too many fields I have the error, Why? Is there some property need to setup? The follow code works well. void __fastcall TUniFormXSWT::UniDBGrid1CellClick(TUniDBGridColumn *Column) { //表格选择记录 String tmpStr; if(UniDBGrid1->SelectedRows->Count==0) { return; } // UniQuery2->Close(); UniQuery2->SQL->Clear(); mySql="select wt_no 问题编号,"; mySql+="wt_name 问题描述,wt_advice 整改建议,wt_pub1 是否同业共性问题,wt_pub2 同业共性问题描述,"; mySql+="rowid from xs_xswt where xs_year =:w1 and xs_name=:w2 and wt_no=:w3"; UniQuery2->SQL->Add(mySql); UniQuery2->ParamByName("w1")->Value=UniComboBox1->Text; UniQuery2->ParamByName("w2")->Value=UniComboBox2->Text; UniQuery2->ParamByName("w3")->Value=UniQuery1->FieldByName("问题编号")->AsString; UniQuery2->Open(); UniEdit1->Text=UniQuery2->FieldByName("问题编号")->AsString; UniEdit2->Text=UniQuery2->FieldByName("问题描述")->AsString; UniEdit3->Text=UniQuery2->FieldByName("整改建议")->AsString; UniComboBox5->Text=UniQuery2->FieldByName("是否同业共性问题")->AsString; UniEdit4->Text=UniQuery2->FieldByName("同业共性问题描述")->AsString; rowId=UniQuery1->FieldByName("rowid")->AsString; }
  4. It seems like that I can not select too many fields one time, I select 28 fields from my table. UniQuery2->Close(); UniQuery2->SQL->Clear(); mySql="select wt_no 问题编号,"; mySql+="wt_name 问题描述,wt_advice 整改建议,wt_pub1 是否同业共性问题,wt_pub2 同业共性问题描述,"; mySql+="wt_his1 是否历届巡视问题,wt_his2 历届巡视问题描述,wt_inst 问题归属机构,wt_bank1 主办行领导,"; mySql+="wt_bank2 协办行领导,wt_part1 主办部门,wt_part2 协办部门,wt_level 决策层级,wt_diff 难度系数,"; mySql+="wt_ask 整改时限要求类别,wt_dead 整改完成时限,wt_over 完成时间,wt_week 反馈周期,wt_days 周几反馈,"; mySql+="wt_fk_stat 完成状态,wt_fk_perc 已完成百分比,wt_fk_prog 主要进展,xs_year 巡视年度,xs_name 巡视名称,"; mySql+="wt_type1 问题大类,wt_type2 问题小类,wt_see1 是否重点关注,wt_see2 重点关注原因,"; // mySql+="rowid from xs_xswt where xs_year =:w1 and xs_name=:w2 order by xs_year desc,xs_name,wt_no"; mySql+="rowid from xs_xswt where xs_year =:w1 and xs_name=:w2 and wt_no=:w3"; UniQuery2->SQL->Add(mySql); UniQuery2->ParamByName("w1")->Value=UniComboBox1->Text; UniQuery2->ParamByName("w2")->Value=UniComboBox2->Text; UniQuery2->ParamByName("w3")->Value=UniQuery1->FieldByName("问题编号")->AsString; UniQuery2->Open();
  5. UniDBGrid1 <-> UniQuery1. XE11.1+unigui1663 I add some code to UniDBGrid's OnCellClick events as follow: UniQuery2->Close(); UniQuery2->SQL->Clear(); mySql="select wt_no 问题编号,.................................."; mySql+="rowid from xs_xswt where xs_year =:w1 and xs_name=:w2 and wt_no=:w3"; UniQuery2->SQL->Add(mySql); UniQuery2->ParamByName("w1")->Value=UniComboBox1->Text; UniQuery2->ParamByName("w2")->Value=UniComboBox2->Text; UniQuery2->ParamByName("w3")->Value=UniQuery1->FieldByName("问题编号")->AsString; UniQuery2->Open(); UniEdit1->Text=UniQuery2->FieldByName("问题编号")->AsString; UniEdit2->Text=UniQuery2->FieldByName("问题描述")->AsString; UniEdit3->Text=UniQuery2->FieldByName("整改建议")->AsString; When I click UniDBGrid1,I get an error as follow.And my project works well with older version.
  6. Solved. If I move the code from void __fastcall TUniFormMindYear::UniFormBeforeShow(TObject *Sender) into void __fastcall TUniFormMindYear::UniFormOnCreate(TObject *Sender) It works well, why? What's the difference between BeforeShow() and OnCreate()???
  7. Dear Sherzod: I use UniHTMLFrame to call jsmind to draw a mind picture, but I find something strange, I click a button to call a form with UniHTMLFrame, if I click the button to test 10 times, 1、3、5、7、9 runs normal, 2、4、6、8 10 have nothing to display, why? void __fastcall TUniFormMindYear::UniFormBeforeShow(TObject *Sender) { int lineNo=0,lineNo1=0,lineNo2=0,lineNo3=0; String yearNo,instName,partName,teamName,rowId,rowId1,rowId2,rowId3,taskName1,taskName2,taskName3; String planDate1,planDate2,overDate1,overDate2,execStat,nodeText,holdUser; String screenWidth=UniApplication->ScreenWidth; String screenHeight=UniApplication->ScreenHeight; UniHTMLFrame1->HTML->Add("<!doctype html>") ; UniHTMLFrame1->HTML->Add("<html>") ; UniHTMLFrame1->HTML->Add("<head>") ; UniHTMLFrame1->HTML->Add(" <meta charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <title>年度计划思维导图</title>") ; UniHTMLFrame1->HTML->Add(" <link type=\"text/css\" rel=\"stylesheet\" href=\"filesHome/jsmind-master/style/jsmind.css\" />") ; UniHTMLFrame1->HTML->Add(" <style type=\"text/css\">") ; UniHTMLFrame1->HTML->Add(" #jsmind_container{") ; UniHTMLFrame1->HTML->Add(" width:"+screenWidth+"px;") ; UniHTMLFrame1->HTML->Add(" height:"+screenHeight+"px;") ; UniHTMLFrame1->HTML->Add(" border:solid 1px #ccc;") ; UniHTMLFrame1->HTML->Add(" background:#f4f4f4;") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" </style>") ; UniHTMLFrame1->HTML->Add("</head>") ; UniHTMLFrame1->HTML->Add("<body>") ; UniHTMLFrame1->HTML->Add("<div id=\"jsmind_container\"></div>") ; UniHTMLFrame1->HTML->Add("<script type=\"text/javascript\">") ; UniHTMLFrame1->HTML->Add(" function load_jsmind(){") ; UniHTMLFrame1->HTML->Add(" var mind = {") ; UniHTMLFrame1->HTML->Add(" \"meta\":{") ; UniHTMLFrame1->HTML->Add(" \"name\":\"年度工作计划思维导图\",") ; UniHTMLFrame1->HTML->Add(" \"author\":\"zhangweihou@126.com\",") ; UniHTMLFrame1->HTML->Add(" \"version\":\"1.0\",") ; UniHTMLFrame1->HTML->Add(" },") ; UniHTMLFrame1->HTML->Add(" \"format\":\"node_array\",") ; UniHTMLFrame1->HTML->Add(" \"data\":[") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"root\", \"isroot\":true, \"topic\":\""+UniMainModule()->selectYear+"年度计划\"},") ; UniHTMLFrame1->HTML->Add(" ]") ; UniHTMLFrame1->HTML->Add(" };") ; UniHTMLFrame1->HTML->Add(" var options = {") ; UniHTMLFrame1->HTML->Add(" container:'jsmind_container',") ; UniHTMLFrame1->HTML->Add(" editable:true,") ; UniHTMLFrame1->HTML->Add(" theme:'primary'") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" var jm = jsMind.show(options,mind);") ; UniHTMLFrame1->HTML->Add(" jm.set_readonly(true);") ; //UniHTMLFrame1->HTML->Add(" var mind_data = jm.get_data();") ; //UniHTMLFrame1->HTML->Add(" alert(mind_data);") ; //UniHTMLFrame1->HTML->Add(" jm.add_node(\"sub2\",\"sub23\", \"new node\", {\"background-color\":\"red\"});") ; //UniHTMLFrame1->HTML->Add(" jm.set_node_color('sub21', 'green', '#ccc');") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" load_jsmind();") ; UniHTMLFrame1->HTML->Add("</script>") ; UniHTMLFrame1->HTML->Add("</body>") ; UniHTMLFrame1->HTML->Add("</html>
  8. I call "jsmind.css" to setup my page,but I find that: if I call the code from UniServerModule->CustomCss (files\jsmind-master\style\jsmind.css), The page comes out abnormal. If I call some code to UniHTMLFrame->HTML,the page is normal. UniHTMLFrame1->HTML->Add("<!doctype html>") ; UniHTMLFrame1->HTML->Add("<html>") ; UniHTMLFrame1->HTML->Add("<head>") ; UniHTMLFrame1->HTML->Add(" <meta charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <title>我的年度计划思维导图</title>") ; UniHTMLFrame1->HTML->Add(" <link type=\"text/css\" rel=\"stylesheet\" href=\"files/jsmind-master/style/jsmind.css\" />") ; UniHTMLFrame1->HTML->Add(" <style type=\"text/css\">") ; UniHTMLFrame1->HTML->Add(" #jsmind_container{") ; UniHTMLFrame1->HTML->Add(" width:800px;") ; UniHTMLFrame1->HTML->Add(" height:500px;") ; UniHTMLFrame1->HTML->Add(" border:solid 1px #ccc;") ; UniHTMLFrame1->HTML->Add(" background:#f4f4f4;") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" </style>") ; UniHTMLFrame1->HTML->Add("</head>") ; My question is : what is the priority between UniHTMLFrame->HTML and UniServerModule->CustomCss ?
  9. Maybe I have to use "UniHTMLFrame1->HTML->Add()" to do this. UniHTMLFrame1->HTML->Add(" \"data\":[") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"root\", \"isroot\":true, \"topic\":\"jsMind\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub1\", \"parentid\":\"root\", \"topic\":\"sub1\", \"background-color\":\"#0000ff\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub11\", \"parentid\":\"sub1\", \"topic\":\"sub11\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub12\", \"parentid\":\"sub1\", \"topic\":\"sub12\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub13\", \"parentid\":\"sub1\", \"topic\":\"sub13\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub2\", \"parentid\":\"root\", \"topic\":\"sub2\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub21\", \"parentid\":\"sub2\", \"topic\":\"sub21\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub22\", \"parentid\":\"sub2\", \"topic\":\"sub22\",\"foreground-color\":\"#33ff33\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub3\", \"parentid\":\"root\", \"topic\":\"sub3\"},") ; UniHTMLFrame1->HTML->Add(" ]") ; UniHTMLFrame1->HTML->Add(" };") ;
  10. Thank you very much, I just want to use UniDAC to query my data and transfer my mind data "node_array" into the jsmind to draw my mind picture.
  11. I am so glad to tell you that I have call jsmind from my unigui project successfully, but I want to call the jsmind dynamicly, How to transfer my own mind data into the html code or javascript? My example is follow: 1、Add js to UniServerModule->CustomFiles: files/js/jsmind.js files/js/jsmind.screenshot.js files/js/jsmind.draggable.js 2、Add css to UniServerModule->CustomCss: files/style/jsmind.css 3、Add HTML code to UniHTMLFrame->HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jsMind</title> <link type="text/css" rel="stylesheet" href="../style/jsmind.css" /> <style type="text/css"> #jsmind_container{ width:800px; height:500px; border:solid 1px #ccc; /*background:#f4f4f4;*/ background:#f4f4f4; } </style> </head> <body> <div id="jsmind_container"></div> <script type="text/javascript" src="../js/jsmind.js"></script> <script type="text/javascript" src="../js/jsmind.draggable.js"></script> <script type="text/javascript"> function load_jsmind(){ var mind = { "meta":{ "name":"demo", "author":"hizzgdev@163.com", "version":"0.2", }, "format":"node_array", "data":[ {"id":"root", "isroot":true, "topic":"jsMind"}, {"id":"sub1", "parentid":"root", "topic":"sub1", "background-color":"#0000ff"}, {"id":"sub11", "parentid":"sub1", "topic":"sub11"}, {"id":"sub12", "parentid":"sub1", "topic":"sub12"}, {"id":"sub13", "parentid":"sub1", "topic":"sub13"}, {"id":"sub2", "parentid":"root", "topic":"sub2"}, {"id":"sub21", "parentid":"sub2", "topic":"sub21"}, {"id":"sub22", "parentid":"sub2", "topic":"sub22","foreground-color":"#33ff33"}, {"id":"sub3", "parentid":"root", "topic":"sub3"}, ] }; var options = { container:'jsmind_container', editable:true, theme:'primary' } var jm = jsMind.show(options,mind); // jm.set_readonly(true); // var mind_data = jm.get_data(); // alert(mind_data); jm.add_node("sub2","sub23", "new node", {"background-color":"red"}); jm.set_node_color('sub21', 'green', '#ccc'); } load_jsmind(); </script> </body> </html>
  12. Dear Shezrod: "JSMind" is a javascript can used to draw some mind picture, and it give me some examples and docs: jsmind-master\docs jsmind-master\examples Can you tell me how to use it in my unigui project? Thank you very much. jsmind-master (2).zip
  13. How to draw a mind map from the data in my database?
  14. UniSession.AddJS (UnimPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("print").click()');
  15. So sorry to tell everyone ,you should run hyper_server.exe instead run your demo.exe, Once you run your hyper_server.exe, your hyper_server.cfg will have token value.
  16. I want to test server farm in one pc I create three path to make three servernodes the same exe with three different port When I run the exe for the first time.I can get a token in the cfg file. but,if I delete the token,i can not reproduce it again, it seems that it can only be produced for the first time, and the other's servernodes can not produce the token too, How can I reproduce the token? And if I test three nodes in one machine,should the token be same? can I write different token into the three server node myself?
×
×
  • Create New...