当前位置:网站首页>02 common codes for Epicor secondary development

02 common codes for Epicor secondary development

2022-06-25 01:58:00 Full stack programmer webmaster

Hello everyone , I meet you again , I'm your friend, Quan Jun .

Epicor Secondary development common code

Sum up your development in the past year Epicor Frequently used code , And also sort out the directory for quick query in the future . Using language :vb.net This article is my original , Reprint please indicate the source

1、 Get the complete SQL, Can be SQL Statement pops up , Used for testing
If oTrans.Session.UserId="19874" Then Epicor.MIS.Pub.PubFun.MsgShow(" Tips ",strSql)
2、EPICOR Location of various data
  • 1、 Crystal report file location \192.168.100.250\EpicorData\CustomReports
  • 2、 Picture location \192.168.100.250\EpicorData\CustomReports\mis
  • 3、 It is written by the plug-in dll Storage location \192.168.100.250\wwwroot\dll
  • 4、 If there is a new addition to the custom system UD Table and UD Field , Must be added to the record table of the file server . K:\MIS-Epicor System \ERP Group\ Customized materials \Epicor Fields use \Epicor Field usage list .xls
3、Form_Load Common code in events ( format 、 Initialization etc. )
  • 1、 prohibit Form New toolbar 、 preservation 、 Delete 、 Refresh and other functions
  • 2、 Hide the left navigation bar 、 Template bar, etc
  • 3、 initialization Session as well as db
  • 4、 Interface Dock A state of overspreading
  • 5、 Date control formatting 、 assignment
  • 6、Label Align text left
  • 7、 Interface initialization select an interface as the display interface
  • 8、 Width of control 、 Height setting
  • 9、 Form maximization
4、 take DataSet The data is written as XML, A data source for designing crystal reports ( stay [ management analysis -SD(C)- Inventory management - Express statement ] We can refer to )
ds.WriteXML("E:awen\"+name+".xml", XmlWriteMode.WriteSchema)

Printing method

5、 take UtraGriew The data of Excel export
6、 Constant identifier of the system :vbCrLf etc.
  • vbCrLf enter / Newline character combination .
  • vbCr Carriage return character .
  • vbLf Newline characters .
  • vbNewLine Newline characters .
  • vbNullChar Null character .
  • vbNullString Not equal to zero length string (“”); Used to call external procedures .
  • vbObjectError Error number . The user-defined error number should be greater than this value . for example : Err.Raise( Numbers )= vbObjectError + 1000
  • vbTab Label character .
  • vbBack Backspace character .
7、 Circular table , And put CheckBox Future generations 、 Or cancel all
8、EPICOR The data dictionary

stay 【 System management - system maintenance - Digital dictionary browser 】 You can see

9、 Change the name of the menu

This is just for changing Chinese , But if you change your English , Want to go 【 Menu maintenance 】 Change this to the desired English And then in 【 Language maintenance 】 Here is a new translated text ERP The bottom language has been set to English , Can only be translated from English to Chinese

10、 Add table field
11、 Data of the initial drop-down selection box ( stay [ management analysis -SD(C)- Inventory management - Express statement ] Or you can refer to in asset addition )
12、 Double click to open other menu interfaces
13、 Send E-mail
14、 Query which company uses the report
15、 The system adapter method updates the standard fields ( Reference interface : materiel - stock - commonly - Asset management - Disposal of ordinary assets —— Quality management - Incoming material inspection and handling )
16、 The title of the Chinese and English interface during initialization
17、 Throw custom exception
18、 Inquire about SQL And prompt

db.ExecuteSql(sql) db.ExecuteDt(sql) db.ExecuteDs(sql)

19、 Guess the original report style and select items

Find the customized name prefix first

Then guess the correct report to add items according to the prefix to the report style

20、 Processing data is DBNULL The situation of , Remove DBNULL

if not ISDBNULL(OBJ)

21、 Page placement picture ( Refer to management analysis -DS- Daily production report )

Place a PictureBox, Then write the code as follows :

22、SQL Check box in the write interface
23、PT、DT、IT、ST Data source

PT Take... Directly LaborDtl The data source inside DT、ST Take view LaborTimeCost IT There are two data sources :LaborTimeCost、 select TOP 100 number01,ShortChar05 from ice.ud21 where key4=‘97’ and key5=‘TITIME’

24、 Click to query the device 、 resources 、 How adapters such as materials get values

Common adapters ResourceGroupAdapter ResourceAdapter EquipAdapter FAssetAdapter PartAdapter JCDeptAdapter EquipStatusAdapter EquipLocAdapter Mode one Reference resources 【 management analysis -SDC- production - Production equipment tracking 】

Mode two Reference resources 【 materiel - stock - commonly - assets - Acceptance of purchased moulds 】

Mode three

Mode 4 Quick search ( Refer to incoming inspection processing )

Methods five Get the value through a quick search

Mode 6 Use “ glasses ” Query load data

25、 Empty UltraGrid The data line
26、 Standard method for modifying table values ( There is an error when the current line has been modified )
26、 obtain DT The value of the inside
27、 remove DataTable Row data
28、for The loop is reversed

The main requirement is to set the step size to negative

29、 You need to reload the data after updating the database fields ( Refer to purchased molds 、 Or incoming material inspection )

Sometimes use oTrans.Refresh() Can't refresh , This method is recommended First SQL to update

db.ExecuteSql("UPDATE ICE.UD32 SET ShortChar03='20' WHERE Company='" + oTrans.Session.CompanyID + "' AND Key1='" & edvUD32.dataView(edvUD32.Row)("Key1") & "' AND Key5='" + strKey5 + "'")

Then reload the data

30、 Get the data of the standard interface
31、 The user deletes the record , Pop up the confirmation window and delete

Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/151797.html Link to the original text :https://javaforall.cn

原网站

版权声明
本文为[Full stack programmer webmaster]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206242153198688.html