zoukankan      html  css  js  c++  java
  • 体温上报软件开发

    这是注册页面,使用前需要注册后才能登录,学号是主键,不能重复

    //---------------------------------------------------------------------提交体温
    Btn_submit = findViewById(R.id.Submit);
    editTemperature = findViewById(R.id.editTemperature);
    ed_address = findViewById(R.id.editAddress);
    TextName = findViewById(R.id.TextName);
    tv_time = findViewById(R.id.tv_time);
    SQLiteDatabase db = dbHelper.getReadableDatabase();

    Btn_submit.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    mContext = addTemperature.this;
    SQLiteDatabase db = dbHelper.getWritableDatabase();
    ContentValues values = new ContentValues();
    values.put("name", TextName.getText().toString());
    values.put("time", tv_time.getText().toString());
    values.put("address", ed_address.getText().toString());
    values.put("temperature", editTemperature.getText().toString());
    values.put("addition",a1);
    long id = db.insert("Temperature", null, values);
    Log.d("myDeBug", "insert");
    db.close();

    Toast.makeText(mContext, "体温登记成功", Toast.LENGTH_SHORT).show();
    Intent intent=new Intent(addTemperature.this,MainActivity.class);
    startActivity(intent);
    }
    });

  • 相关阅读:
    Currency Exchange
    Robot Motion
    Crashing Robots
    Parencodings
    Y2K Accounting Bug
    Tautology
    Power of Cryptography
    Radar Installation -poj 1328
    The Pilots Brothers' refrigerator
    【java】之cron表达式
  • 原文地址:https://www.cnblogs.com/D10304/p/14910389.html
Copyright © 2011-2022 走看看