git-svn-id: http://192.168.1.226/svn/proxy@402 454eff88-639b-444f-9e54-f578c98de674
| | |
| | | /**
|
| | | * 人员名首字母
|
| | | */
|
| | | public static final String nameSpell = "nameSpell";
|
| | | public static final String nameEn = "nameEn";
|
| | | /**
|
| | | * 性别
|
| | | */
|
| | |
| | | // 人员名字
|
| | | private String username;
|
| | | // 人员名首字母
|
| | | private String nameSpell;
|
| | | private String nameEn;
|
| | | // 性别
|
| | | private String genderId;
|
| | | // 国籍
|
| | |
| | | /**
|
| | | * Get 人员名首字母
|
| | | */
|
| | | public String getNameSpell() {
|
| | | return nameSpell;
|
| | | public String getNameEn() {
|
| | | return nameEn;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Set 人员名首字母
|
| | | */
|
| | | public void setNameSpell(String nameSpell) {
|
| | | this.nameSpell = nameSpell;
|
| | | public void setNameEn(String nameEn) {
|
| | | this.nameEn = nameEn;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | |
|
| | | public String toString() {
|
| | | return |
| | | ",人员主键 =" + registerId + ",人员名字 =" + username + ",人员名首字母 ="+ nameSpell + |
| | | ",性别 =" + genderId + ",国籍 =" + countryId + ",省 =" + province + |
| | | ",市 =" + city + ",出生日期 =" + birthday + ",座机电话 =" + tel + |
| | | ",移动电话 =" + mobilePhone + ",证件类型 =" + identityTypeId + ",证件编号 =" + identifyNum + |
| | | ",公司主键 =" + companyId + ",部门主键 =" + departmentId + ",职务主键 =" + postId + |
| | | ",人员备注消息 ="+ remark + ",危险人员警告消息 ="+ warning ;
|
| | | return
|
| | | ",人员主键 =" + registerId + ",人员名字 =" + username + ",人员名首字母 ="+ nameEn +
|
| | | ",性别 =" + genderId + ",国籍 =" + countryId + ",省 =" + province +
|
| | | ",市 =" + city + ",出生日期 =" + birthday + ",座机电话 =" + tel +
|
| | | ",移动电话 =" + mobilePhone + ",证件类型 =" + identityTypeId + ",证件编号 =" + identifyNum +
|
| | | ",公司主键 =" + companyId + ",部门主键 =" + departmentId + ",职务主键 =" + postId +
|
| | | ",人员备注消息 ="+ remark + ",危险人员警告消息 ="+ warning ;
|
| | | }
|
| | | }
|
| | |
| | | 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);
|
| | |
| | | params.setUri(AppApi.BASE_URL +AppApi.REGISTER_ADD);
|
| | | params.addBodyParameter("file1", f1);
|
| | | params.addBodyParameter("file2", f2);
|
| | | }catch(Exception e) {
|
| | | e.printStackTrace(); x.http().post(params, new BaseCommonCallBack() {
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | @Override
|
| | | public void success() {
|
| | | Toast.makeText(BaseApplication.getInstance(),"添加成功", Toast.LENGTH_SHORT).show();
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | }catch(Exception e) {
|
| | | e.printStackTrace();
|
| | |
|
| | | }
|
| | | }
|
| | |
|