|
|
@ -1,5 +1,7 @@ |
|
|
|
package com.gmeremit.online.gmeremittance_native.recipientV2.view.recipientadd; |
|
|
|
|
|
|
|
import android.app.Activity; |
|
|
|
import android.content.Intent; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.view.View; |
|
|
|
import android.view.ViewGroup; |
|
|
@ -23,7 +25,6 @@ import com.gmeremit.online.gmeremittance_native.recipientV2.view.RecipientDistri |
|
|
|
import com.gmeremit.online.gmeremittance_native.recipientV2.view.RecipientProvinceListingDialog; |
|
|
|
import com.gmeremit.online.gmeremittance_native.recipientV2.view.RecipientRelationListingDialog; |
|
|
|
import com.gmeremit.online.gmeremittance_native.recipientV2.view.RecipientTransferListingDialog; |
|
|
|
import com.gmeremit.online.gmeremittance_native.recipientV2.view.recipientlisting.RecipientListingV2Activity; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.Constants; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
@ -89,7 +90,7 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
private CountryDetailModel selectedCountry; |
|
|
|
private ProvinceDetailModel selectedProvince; |
|
|
|
private TransferDetailModel selectedTransferReason; |
|
|
|
private RelationDetailModel seletedRelation; |
|
|
|
private RelationDetailModel selectedRelation; |
|
|
|
private DistrictDetailModel selectedDistrict; |
|
|
|
|
|
|
|
private List<TransferDetailModel> transferReasonList; |
|
|
@ -225,7 +226,7 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
selectedProvince, |
|
|
|
selectedDistrict, |
|
|
|
ed_address.getText().toString(), |
|
|
|
seletedRelation, |
|
|
|
selectedRelation, |
|
|
|
ed_mobile_no.getText().toString(), |
|
|
|
ed_email.getText().toString(), |
|
|
|
selectedTransferReason |
|
|
@ -315,6 +316,43 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void showDataForEditing(String firstName, String middleName, String lastName, CountryDetailModel selectedCountry, ProvinceDetailModel selectedProvince, DistrictDetailModel selectedDistrict, String address, RelationDetailModel selectedRelation, String mobileNo, String email, TransferDetailModel selectedTransfer) { |
|
|
|
ed_firstname.setText(firstName); |
|
|
|
ed_middlename.setText(middleName); |
|
|
|
ed_lastname.setText(lastName); |
|
|
|
this.selectedCountry=selectedCountry; |
|
|
|
this.selectedProvince=selectedProvince; |
|
|
|
this.selectedDistrict=selectedDistrict; |
|
|
|
ed_address.setText(address); |
|
|
|
this.selectedRelation =selectedRelation; |
|
|
|
ed_mobile_no.setText(mobileNo); |
|
|
|
ed_email.setText(email); |
|
|
|
this.selectedTransferReason=selectedTransfer; |
|
|
|
|
|
|
|
if(this.selectedCountry!=null) |
|
|
|
ed_country.setText(this.selectedCountry.getName()); |
|
|
|
|
|
|
|
if(this.selectedProvince!=null) |
|
|
|
ed_province.setText(this.selectedProvince.getText()); |
|
|
|
|
|
|
|
if(this.selectedDistrict!=null) |
|
|
|
ed_district.setText(this.selectedDistrict.getText()); |
|
|
|
|
|
|
|
if(this.selectedRelation!=null) |
|
|
|
ed_relation.setText(this.selectedRelation.getText()); |
|
|
|
|
|
|
|
if(selectedTransferReason!=null) |
|
|
|
ed_transfer.setText(selectedTransferReason.getText()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void returnToCallingActivityForSucess() { |
|
|
|
Intent returnIntent = new Intent(); |
|
|
|
setResult(Activity.RESULT_OK,returnIntent); |
|
|
|
finish(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onProvinceSelected(ProvinceDetailModel provinceDetailModel) { |
|
|
|
this.selectedProvince = provinceDetailModel; |
|
|
@ -347,8 +385,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onRelationSelected(RelationDetailModel relationDetailModel) { |
|
|
|
this.seletedRelation = relationDetailModel; |
|
|
|
this.ed_relation.setText(this.seletedRelation.getText()); |
|
|
|
this.selectedRelation = relationDetailModel; |
|
|
|
this.ed_relation.setText(this.selectedRelation.getText()); |
|
|
|
if (relationListingDialog != null) { |
|
|
|
relationListingDialog.dismiss(); |
|
|
|
relationListingDialog = null; |
|
|
|