예제 #1
0
 /** 增加人员信息 */
 public void addStaff(UserVO uservo) {
   try {
     DatabaseFactory database = (DatabaseFactory) Naming.lookup(RMIConnect.RMI);
     InformationFactory inf = database.getInformationFactory();
     InformationInsertDataService infoinsert = inf.getInformationInsertData();
     UserPO sp =
         new UserPO(
             uservo.getId(),
             uservo.getPassword(),
             uservo.getRole(),
             uservo.getName(),
             uservo.getInstitution());
     infoinsert.insert(sp);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  private void init() {
    title = new JLabel("机构管理");
    butOut = new UltraButton("返回");
    butAdd = new UltraButton("新增");
    butDel = new UltraButton("删除");
    butFind = new UltraButton("查找");
    butChange = new UltraButton("修改");
    OK = new UltraButton("确定");
    cancel = new UltraButton("取消");

    userId = new JLabel(" 账号: " + user.getId());

    userRole = new JLabel("身份: " + UserRole.transfer(user.getRole()));

    labelID = new JLabel("机构编号:");
    textID = new UltraTextField();
    labelLocation = new JLabel("机构所处位置:");
    textLocation = new UltraTextField();
  }