|
@@ -24,6 +24,7 @@ import com.ynstkz.shitu.android.bean.LocalCityBean;
|
|
|
import com.ynstkz.shitu.android.bean.StudentFamilyInfoBean;
|
|
|
import com.ynstkz.shitu.android.bean.StudentInfoAddBean;
|
|
|
import com.ynstkz.shitu.android.data.RequestGroup;
|
|
|
+import com.ynstkz.shitu.android.data.SharedPreferencesUtils;
|
|
|
import com.ynstkz.shitu.android.view.ScrollViewWithGridView;
|
|
|
|
|
|
import java.text.DateFormat;
|
|
@@ -234,6 +235,7 @@ public class StudentInfoActivity extends TitleBarActivity {
|
|
|
btnSave.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
+ saveApplyFamilyInfo();
|
|
|
String studentName = editUsername.getText().toString().trim();
|
|
|
if(TextUtils.isEmpty(studentName)){
|
|
|
showToast("用户名不能为空");
|
|
@@ -413,14 +415,21 @@ public class StudentInfoActivity extends TitleBarActivity {
|
|
|
private void saveApplyFamilyInfo(){
|
|
|
if(llMemberFamily.getChildCount() > 0) {
|
|
|
for (int i=0; i<llMemberFamily.getChildCount(); i++) {
|
|
|
+ LinearLayout viewMemberFamilyItem = (LinearLayout) llMemberFamily.getChildAt(i);
|
|
|
+
|
|
|
+ String tv_familyName = ((EditText)viewMemberFamilyItem.findViewById(R.id.tv_familyName)).getText().toString().trim();
|
|
|
+ String familyPhone = ((EditText)viewMemberFamilyItem.findViewById(R.id.edit_familyPhone)).getText().toString().trim();
|
|
|
+ String job = ((EditText)viewMemberFamilyItem.findViewById(R.id.edit_job)).getText().toString().trim();
|
|
|
+ String remark = ((EditText)viewMemberFamilyItem.findViewById(R.id.edit_remark)).getText().toString().trim();
|
|
|
+
|
|
|
StudentFamilyInfoBean studentFamilyInfoBean = new StudentFamilyInfoBean();
|
|
|
- studentFamilyInfoBean.setFamilyName("");
|
|
|
+ studentFamilyInfoBean.setFamilyName(tv_familyName);
|
|
|
studentFamilyInfoBean.setFamilyId("");
|
|
|
- studentFamilyInfoBean.setFamilyPhone("");
|
|
|
- studentFamilyInfoBean.setJob("");
|
|
|
- studentFamilyInfoBean.setRemark("");
|
|
|
+ studentFamilyInfoBean.setFamilyPhone(familyPhone);
|
|
|
+ studentFamilyInfoBean.setJob(job);
|
|
|
+ studentFamilyInfoBean.setRemark(remark);
|
|
|
studentFamilyInfoBean.setStudentInfoId("");
|
|
|
- studentFamilyInfoBean.setUserId("");
|
|
|
+ studentFamilyInfoBean.setUserId(SharedPreferencesUtils.getUserId());
|
|
|
listStudentFamilyInfo.add(studentFamilyInfoBean);
|
|
|
}
|
|
|
}
|
|
@@ -440,8 +449,8 @@ public class StudentInfoActivity extends TitleBarActivity {
|
|
|
public void onResponse(Object response, int id) {
|
|
|
StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean)response;
|
|
|
if(studentInfoAddBean != null) {
|
|
|
- if("200".equals(studentInfoAddBean.getCode())){
|
|
|
- saveApplyFamilyInfo();
|
|
|
+ if("200".equals(studentInfoAddBean.getCode())){ //提交家庭信息成功
|
|
|
+
|
|
|
} else {
|
|
|
showToast(studentInfoAddBean.getMsg());
|
|
|
}
|