예제 #1
0
 private void goIntent(ChatInfoBean chatInfoBean) {
   // TODO Auto-generated method stub
   chatInfoBean.setSubjectType("1");
   chatInfoBean.setStatus(true);
   DBUtilsHelper.getInstance().saveChatinfo(chatInfoBean);
   Intent i = new Intent();
   i.setClass(context, GroupChatActivity.class);
   Bundle bundle = new Bundle();
   bundle.putSerializable("chatInfoBean", chatInfoBean);
   i.putExtras(bundle);
   context.startActivity(i);
 }
예제 #2
0
 private void saveDoc(DocInfoBean docInfoBean) {
   // TODO Auto-generated method stub
   // DbUtils dbUtils = new DbUtils(null);
   DbUtils db = DBUtilsHelper.getInstance().getDb();
   try {
     db.createTableIfNotExist(DocInfoBean.class);
     db.save(docInfoBean);
   } catch (DbException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
예제 #3
0
 /** JS调用的方法 */
 @JavascriptInterface
 public void goToReport(String studyid) {
   userModel =
       new Gson().fromJson(SharedPrefsUtil.getValue(Constants.USERMODEL, null), UserModel.class);
   Log.i(TAG, "goToReport()");
   Intent intent = new Intent();
   if (!DBUtilsHelper.getInstance().isOnline()) {
     requestDoctor(studyid);
   } else {
     ToastUtil.showMessage("您当前正在进行在线咨询,结束后才能进行报告解读哦");
     SharedPrefsUtil.putValue(Constants.CHECKEDID_RADIOBT, 1);
     Intent intent2 = new Intent(WebViewActivity.this, MainActivity.class);
     intent2.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
     intent2.putExtra("news", "news");
     startActivity(intent2);
     finish();
     return;
   }
   startActivity(intent);
 }
예제 #4
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.chat_comment);
    dbUtils = DBUtilsHelper.getInstance().getDb();
    Intent i = getIntent();
    if (null != i) {
      subjectID = i.getExtras().getString("subjectId");
      try {
        chatInfoBean =
            dbUtils.findFirst(Selector.from(ChatInfoBean.class).where("SubjectID", "=", subjectID));

        if (null != chatInfoBean) {
          subjectType = chatInfoBean.getSubjectType();
        }
      } catch (DbException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
    initView();
    initListener();
    listenET();
  }