In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In the metrics rapid development platform, in the organization maintenance, there are several organization-related functions such as department post setting, personnel registration and personnel placement. The table of these function operation should have the sa_dept_dict,sa_staff_info,sa_staff_ table. After the system uses the functions provided by the platform to maintain the departmental posts, personnel and posts, the personnel will be able to see the effect of the new settings when they log in again.
If the secondary developer wants to rebuild the functions of department post setting, personnel registration and personnel post setting, when inserting data into these tables, if the data is directly executed by the insert into table, then after the personnel log in again, they will not see the effect of the setting, this is because the system performance is taken into account in the platform, and the organizational data is cached.
So when users build the organization for the second time, how to refresh the organization cache?
When we insert data into these tables, we cannot use executeNonquery (insert into). Instead, we need to use the SaveDataTable method provided by the platform, which automatically refreshes when the table data of the organization is detected.
Example of how to use it (build a staff post)
Dim dt = executeSelect ("select ID,USER_ID,DEPT_ID,SORT_ORDER,IS_DEFAULT from SA_STAFF_ROLE where 1: 0")
Dim dr
Dr = dt.NewRow ()
Dr ["ID"] = Guid ()
Dr ["USER_ID"] = manager information. GetFocusedRowValue ("ID")
Dr ["DEPT_ID"] = return_RoleID
Dr ["SORT_ORDER"] = 1
Dr ["IS_DEFAULT"] = 0
Dt.Rows.Add (dr)
SaveDataTable ("default", "SA_STAFF_ROLE", dt)
'Save DataTable. The first parameter is the database name, string; the second parameter is the table name, string
'The third parameter is the DataTable corresponding to the table, and only the fields in the database can be saved.
SaveDataTable ("default", "table_name", datatable)
Original address: http://bbs.delit.cn/thread-1067-1-1.html
Please indicate the source of the reprint:
Written by: measurement Technology http://www.delit.cn
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.