| | |
| | | String name = register_name.getValue();
|
| | | if (name.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "姓名不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_name.requestFocus();
|
| | | return;
|
| | | }
|
| | | String phone = register_phone.getValue();
|
| | | if (phone.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "电话不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_phone.requestFocus();
|
| | | return;
|
| | | }
|
| | | String gender = register_gender.getValue();
|
| | | if (gender.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "性别不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_gender.callOnClick();
|
| | | return;
|
| | | }
|
| | | String id_class = register_id_class.getValue();
|
| | | if (id_class.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "证件类型不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_id_class.callOnClick();
|
| | | return;
|
| | | }
|
| | | String country = register_country.getValue();
|
| | | if (country.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "国籍不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_country.callOnClick();
|
| | | return;
|
| | | }
|
| | | String id_num = register_id_num.getValue();
|
| | | if (id_num.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "证件编号不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_id_num.requestFocus();
|
| | | return;
|
| | | }
|
| | | String birthday = register_birthday.getValue();
|
| | | if (birthday.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "出生日期不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_birthday.callOnClick();
|
| | | return;
|
| | | }
|
| | | String company = register_company.getValue();
|
| | | if (company.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "公司名称不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_company.requestFocus();
|
| | | return;
|
| | | }
|
| | | String remark = register_remark.getValue();
|
| | | if (remark.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "备注不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_remark.requestFocus();
|
| | | return;
|
| | | }
|
| | | String visitor_class = register_visitor_class.getValue();
|
| | | if (visitor_class.trim().length() <= 0) {
|
| | | Toast.makeText(MainActivity.getInstance(), "访客类型不能为空", Toast.LENGTH_SHORT).show();
|
| | | register_visitor_class.callOnClick();
|
| | | return;
|
| | | }
|
| | | params.addBodyParameter(Register.FieldNames.username, name);
|