国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

EAS開發(fā)之接口小程序上

2019-11-06 06:19:40
字體:
供稿:網(wǎng)友

EAS開發(fā)之接口小程序上

PS:排版不好還請(qǐng)見諒

界面控件用法界面代碼展示擴(kuò)展鏈接

界面控件用法

KDLabelContainer 標(biāo)簽容器控件 為了與標(biāo)簽與文本框或選取框連接起來使界面更加美觀。KDBizPRomptBox F7選擇框控件 通過自定義query來確定選取框搜索內(nèi)容,具體用法代碼注釋里面有。KDButton 按鈕控件 在UI中創(chuàng)建按鈕,雙擊進(jìn)入代碼編輯內(nèi)容,不編輯然后發(fā)布,在ui的java文件中即出現(xiàn)響應(yīng)按鈕功能編輯方法。KDTextField 文本框控件 用戶可輸入文本的控件,默認(rèn)格式為String,在代碼區(qū)域可通過 this.name.getText().toString 取得輸入內(nèi)容,通過 this.name.setText(內(nèi)容) 設(shè)置顯示內(nèi)容。MsgBox.showWarning() 彈出框注: 命名要規(guī)范; 界面設(shè)計(jì)要考慮用戶體驗(yàn);

界面代碼展示

我會(huì)盡可能的完善注釋,如有不明白或者錯(cuò)誤的地方,請(qǐng)留言給我或者給我發(fā)郵件 —— [ 聯(lián)系我 ]

package com.kingdee.eas.custom.pxb.client;import java.awt.event.*;import net.sf.json.JSONObject;import org.apache.log4j.Logger;import com.kingdee.bos.ui.face.CoreUIObject;import com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox;import com.kingdee.bos.dao.IObjectValue;import com.kingdee.eas.base.permission.client.UserF7UI;import com.kingdee.eas.basedata.org.client.f7.*;import com.kingdee.eas.basedata.person.client.PersonF7Const;import com.kingdee.eas.basedata.person.client.PersonF7Filter;import com.kingdee.eas.basedata.person.client.PersonF7UI;import com.kingdee.eas.common.client.SysContext;import com.kingdee.eas.custom.pxb.ipxbComFacade;import com.kingdee.eas.custom.pxb.IPxbPreFacade;import com.kingdee.eas.custom.pxb.PxbComFacadeFactory;import com.kingdee.eas.custom.pxb.PxbPreFacadeFactory;import com.kingdee.eas.fm.gnt.common.PersonF7;import com.kingdee.eas.framework.*;import com.kingdee.eas.hr.base.client.F7ListUI;import com.kingdee.eas.util.SysUtil;import com.kingdee.eas.util.client.MsgBox;/** * output class name */public class PxbPerUI extends AbstractPxbPerUI{ private static final Logger logger = CoreUIObject.getLogger(PxbPerUI.class); /** * output class constructor */ public PxbPerUI() throws Exception { super();//自定義F7配置 //setQueryInfo() 查詢對(duì)象的PK值,String類型,且主對(duì)象必須是主鍵。//set*Format() 設(shè)置顯示及其他狀態(tài)的顯示屬性。 this.pref7.setQueryInfo("com.kingdee.eas.basedata.person.app.PersonQuery"); this.pref7.setEditFormat("$name$"); this.pref7.setDisplayFormat("$name$"); this.pref7.setCommitFormat("$name$"); } /** * output storeFields method */ public void storeFields() { super.storeFields(); } /** * output preadd_actionPerformed method */ //添加員工 protected void preadd_actionPerformed(java.awt.event.ActionEvent e) throws Exception { String pername = null, perid = null,perorg = null,comid = null; String result = ""; //取F7控件查詢對(duì)象對(duì)應(yīng)key值的數(shù)據(jù) if (this.pref7.getValue() != null) { perid = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("id"); //comid= ((AbstractCoreBaseInfo) this.comf7.getValue()).getString("id"); pername = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("name_l2"); } else { MsgBox.showWarning("員工或組織不能為空"); SysUtil.abort(); } //調(diào)用接口,來使用服務(wù)器方法。 IPxbPreFacade ip = PxbPreFacadeFactory.getRemoteInstance(); result = ip.preadd(pername,perid); if(result.equals("已存在")==true){ MsgBox.showWarning("該員工已存在"); }else{ if(result.equals("插入失敗")==true){ MsgBox.showWarning("執(zhí)行插入失敗"); } else{ MsgBox.showWarning("添加成功"); } } super.preadd_actionPerformed(e); } /** * output preget_actionPerformed method */ //獲得員工數(shù)據(jù) protected void preget_actionPerformed(java.awt.event.ActionEvent e) throws Exception { String pername = null, perid = null,perorg = null,comid = null,comname = null; String result = ""; if (this.pref7.getValue() != null) { perid = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("id"); //comid= ((AbstractCoreBaseInfo) this.comf7.getValue()).getString("id"); pername = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("name_l2"); //comname = ((AbstractCoreBaseInfo) this.comf7.getValue()).getString("name_l2"); } else { MsgBox.showWarning("員工不能為空"); SysUtil.abort(); } IPxbPreFacade ip = PxbPreFacadeFactory.getRemoteInstance(); result = ip.preget(pername); if(result.equals("員工不存在")){ MsgBox.showWarning("該組織不存在"); }else{ JSONObject jsondata = (JSONObject) JSONObject.fromObject(result); //模擬json數(shù)據(jù) //JSONObject json = (JSONObject) JSONObject.fromObject(result) ; //JSONObject jsondata = json.getJSONObject("data"); String id = jsondata.getString("id"); String pid = jsondata.getString("name"); String orgid = jsondata.getString("orgid"); String esid = jsondata.getString("esid"); MsgBox.showWarning("查詢成功,員工名字為"+pid+"。");//組織名稱為"+comname+"."); super.preget_actionPerformed(e); } } /** * output predel_actionPerformed method */ //刪除員工信息 protected void predel_actionPerformed(java.awt.event.ActionEvent e) throws Exception { String pername = null, perid = null,perorg = null,comid = null; String result = ""; if (this.pref7.getValue() != null) { perid = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("id"); //comid= ((AbstractCoreBaseInfo) this.comf7.getValue()).getString("id"); pername = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("name_l2"); } else { MsgBox.showWarning("員工或組織不能為空"); SysUtil.abort(); } IPxbPreFacade ip = PxbPreFacadeFactory.getRemoteInstance(); result = ip.predel(perid); MsgBox.showWarning("刪除成功"); super.predel_actionPerformed(e); } /** * output preup_actionPerformed method */ //更新員工信息 protected void preup_actionPerformed(java.awt.event.ActionEvent e) throws Exception { String pername = null, perid = null,perorg = null,comid = null,comname = null; String result = ""; if (this.pref7.getValue() != null) { perid = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("id"); //comid= ((AbstractCoreBaseInfo) this.comf7.getValue()).getString("id"); pername = ((AbstractCoreBaseInfo) this.pref7.getValue()).getString("name_l2"); //comname = ((AbstractCoreBaseInfo) this.comf7.getValue()).getString("name_l2"); } else { MsgBox.showWarning("員工不能為空"); SysUtil.abort(); } //String id = this.preupid.getText().toString(); IPxbPreFacade ip = PxbPreFacadeFactory.getRemoteInstance(); result = ip.preup(perid,pername,comid,pername); if(result.equals("組織不存在")==true){ MsgBox.showWarning("該員工未添加"); }else{ MsgBox.showWarning("組織內(nèi)容更新完成"); } super.preup_actionPerformed(e); } /** * output precrbd_actionPerformed method */ //創(chuàng)建數(shù)據(jù)表 protected void precrbd_actionPerformed(java.awt.event.ActionEvent e) throws Exception { IPxbPreFacade ip = PxbPreFacadeFactory.getRemoteInstance(); ip.precrdb(); //super.precrbd_actionPerformed(e); }}

F7配置代碼擴(kuò)展

//行政組織//用系統(tǒng)自帶的組織架構(gòu)F7功能this.setUITitle("培訓(xùn)寶組織管理");//行政組織對(duì)象 AdminF7AdminF7 sf7 = new AdminF7();if (!SysContext.getSysContext().getCurrentOrgUnit().getId().toString().equals("00000000-0000-0000-0000-000000000000CCE7AED4")) { sf7.setIsCUFilter(true); } this.comf7.setSelector(sf7); this.comf7.setRequired(true); this.comf7.setValue(SysContext.getSysContext() .getCurrentAdminUnit()); this.comf7up.setSelector(sf7); this.comf7up.setRequired(true); this.comf7up.setValue(SysContext.getSysContext() .getCurrentAdminUnit());

擴(kuò)展鏈接

F7實(shí)體對(duì)象應(yīng)用可參考



發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 北流市| 溧阳市| 柞水县| 连州市| 日照市| 枝江市| 开鲁县| 宾阳县| 周至县| 苍山县| 正镶白旗| 会泽县| 左贡县| 通江县| 丽江市| 新蔡县| 正蓝旗| 灵川县| 含山县| 锦州市| 许昌市| 枣强县| 闽清县| 利川市| 平度市| 惠东县| 绵阳市| 石屏县| 安丘市| 四子王旗| 斗六市| 水富县| 遂昌县| 嘉荫县| 平泉县| 唐河县| 南溪县| 寿阳县| 吴江市| 梁平县| 威宁|