Exemplo n.º 1
0
  /** 当修改公会名片成功后 去更新数据库里面的内容 */
  protected void modifyDatabase(String content) {
    GroupUserRelDao userRelDao =
        DaoFactory.getDaoFactory().getGroupUserRelDao(SystemContext.getInstance().getContext());
    GroupUserRelVo vo =
        userRelDao.findUsers(grid, SystemContext.getInstance().getExtUserVo().getUserid());
    if (vo == null) {
      ServiceFactory.getInstance()
          .getSyncListService()
          .syncList(
              SyncListService.TYPE_GROUP_USER,
              grid,
              new SyncCallBack() {

                @Override
                public void onSuccess(Object result) {}

                @Override
                public void onFailure(Integer result) {}
              });

    } else {
      vo.setRemark(content);
      userRelDao.insertOrUpdate(vo);
    }
  }
Exemplo n.º 2
0
 /** 做一些初始化操作 初始化控件 */
 private void init() {
   dao = DaoFactory.getDaoFactory().getGroupUserRelDao(SystemContext.getInstance().getContext());
   titleTxt.setText("我的公会名片");
   LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
   View view = View.inflate(this, R.layout.group_card_activity, null);
   getContentView().addView(view, params);
   groupcard = (TextView) view.findViewById(R.id.group_card_detail);
   groupCardItem = (LinearLayout) view.findViewById(R.id.groupcardItem);
   groupcard.setText(groupCardContent + "");
   this.oriContent = groupCardContent;
   setListener();
 }