12/13/2017

Axapta : Axapta กดปุ่มแล้วให้ใน Gride ไป Select แถวแรกเสมอ เพื่อใช้งานแถวแรกเป็นตัวหลัก

Axapta : Axapta กดปุ่มแล้วให้ใน Gride ไป Select แถวแรกเสมอ เพื่อใช้งานแถวแรกเป็นตัวหลัก

Code
  1.        *_ds.getFirst(1, false);
  2.         *_ds.refresh();
  3.         *_ds.reread();
  4.         *_ds.research();

เช่น
  1.        InventJournalTrans_ds.getFirst(1, false);
  2.         InventJournalTrans_ds.refresh();
  3.         InventJournalTrans_ds.reread();
  4.         InventJournalTrans_ds.research();

11/24/2017

Ubuntu : Ubuntu Remote จอใหญ่แล้วต้องเลื่อนจอเอง

Ubuntu : Ubuntu Remote จอใหญ่แล้วต้องเลื่อนจอเอง
เดิมใช้โปรแกรม xtightvncviewer ซึ่งไม่มี Option auto scale จอ

ให้เปลี่ยนไปใช้โปรแกรมใหม่ ชื่อ realvnc
Download ได้ที่
https://www.realvnc.com/en/connect/download/viewer/linux/

- ถอด โปรแกรมเดิมออกก่อน
- ติดตั้งโปรแกรมใหม่
- เรียกใช้ด้วยคำสั่ง vncview เหมือนเดิม
ก็จะเห็นหน้าจอเต็มจอ ถ้าจอใหญ่กว่าเช่น AIO

11/10/2017

PHP : PHP อ่านไฟล์ jpg ใน Folder มาแสดง

PHP : PHP อ่านไฟล์ jpg ใน Folder มาแสดง

  1. $dir = "Ams_Delete/".$DepRun."/";
  2. foreach(glob($dir.'*.jpg') as $file) {
  3.     //print $file . "\n";
  4.     $ShowImage  = $ShowImage."<br><a href=".$file."  target="."_blank"."> <img src=".$file." width="."500"." height="."400"." alt="."Fire!"."></a>";
  5. }


https://stackoverflow.com/questions/8682206/retrieve-the-list-of-alla-jpg-file-of-a-directory

11/08/2017

Axapta : Axapta Join InventTable แสดงข้อมูลในหน้า Onhand

Axapta : Axapta Join InventTable แสดงข้อมูลในหน้า Onhand
1. ลาก Table InventTable ไปเป็น Data Sources แล้วกำหนด Properties
JoinSource : InventSum
LinkType : InnerJoin
2. แก้ Classes InventDimCtrl_Frm_OnHand
Method : modifyQuery
  1. FormDataSource InventTable_DS
  2. ;
  3. QueryBuildDataSource    qbsInventLookup;
และ Code ส่วนนี้ไว้ล่างสุด
  1.    if(InventTable_DS)
  2.     {
  3.         qbsInventLookup = query.dataSourceName(InventTable_DS.name());
  4.  
  5.         //filter current company language
  6.         /*qbr = SysQuery::findOrCreateRange(qbsInventLookup, fieldnum(TIDInventLookup, LanguageId));
  7.         qbr.value(queryValue(CompanyInfo::languageId()));
  8.         */
  9.         //qbsInventLookup.addGroupByField(fieldNum(SCI_InventSumLookUp, ItemName));
  10.         //qbsInventLookup.addGroupByField(fieldNum(TIDInventLookup,NameAlias));
  11.         //qbsInventLookup.addDataSource(fieldNum(SCI_InventSumLookUp, ItemName));
  12.         qbsInventLookup.orderMode(OrderMode::GROUPBY);
  13.         //qbsInventLookup.addSelectionField(fieldnum(SCI_InventSumLookUp, ItemName));
  14.         qbsInventLookup.addSortField(fieldnum(InventTable, ItemName));
  15.         //qbsInventLookup.addGroupByField(fieldnum(SalesLine,ItemId));
  16.  
  17.     }


3. ที่ Form
Method : executeQuery แก้
  1. element.inventDimSetupObject().modifyQuery(inventSum_DS,inventDim_DS,InventTable_DS);

4. ลาก Field จาก Data Sources InventTable ที่ต้องการแสดงเช่น ItemName ไปใส่ใน Form
 
 
 https://community.dynamics.com/ax/b/hellodax/archive/2015/06/19/join-itemname-from-ecoresproducttranslation-and-search-name-from-inventtable-to-onhand-form-for-search-matter

10/31/2017

Server HP :: HP Use iLo Port

Server HP :: HP Use iLo Port
1. ต่อสาย Lan เข้า Port iLo ด้านหลังจะมีเขียนว่า iLO และต่อเข้ากับ Switch ที่ต้องการใช้งาน เช่นวง 2
2. Boot เครื่องแล้วกด F10 เพื่อเข้า Config IP และ Password ตามรูป Config IP ไว้แล้วจะแสดง ว่าเข้าผ่าน IP นี้ ตามรูป
3. เลือก Perform Maintenance ตามรูป
4. เลือก iLO Configuration
5. Menu ด้านซ้าย เลือก Standard Network Settings
แล้วกำหนด IP
6. Menu ด้านซ้าย เลือก User Accounts ตั้ง รหัสผ่าน กด Apply กด Exit
7. Reboot เครื่อง
เข้าใช้งาน ใส่ User Name และ Password ที่ตั้งไว้

ไว้ดู Log ดูการทำงานของเครื่อง และ อื่น ๆ