|
@ -43,6 +43,7 @@ import butterknife.ButterKnife; |
|
|
import butterknife.OnClick; |
|
|
import butterknife.OnClick; |
|
|
import butterknife.OnFocusChange; |
|
|
import butterknife.OnFocusChange; |
|
|
import butterknife.OnTextChanged; |
|
|
import butterknife.OnTextChanged; |
|
|
|
|
|
import cn.pedant.SweetAlert.SweetAlertDialog; |
|
|
import ru.visionlab.femdemo.App; |
|
|
import ru.visionlab.femdemo.App; |
|
|
import ru.visionlab.femdemo.BuildConfig; |
|
|
import ru.visionlab.femdemo.BuildConfig; |
|
|
import ru.visionlab.femdemo.Config; |
|
|
import ru.visionlab.femdemo.Config; |
|
@ -197,14 +198,27 @@ public class RegisterFragment extends BaseFragment { |
|
|
editor.putString("Employeeid",_employeeid); |
|
|
editor.putString("Employeeid",_employeeid); |
|
|
editor.commit(); |
|
|
editor.commit(); |
|
|
|
|
|
|
|
|
Toast.makeText(getContext(), "Success Registration", Toast.LENGTH_SHORT).show(); |
|
|
|
|
|
Intent intent=new Intent(getContext(),RegisterActivity.class); |
|
|
|
|
|
startActivity(intent); |
|
|
|
|
|
|
|
|
new SweetAlertDialog(getContext(), SweetAlertDialog.SUCCESS_TYPE) |
|
|
|
|
|
.setTitleText("Success Registration") |
|
|
|
|
|
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(SweetAlertDialog sDialog) { |
|
|
|
|
|
Intent intent=new Intent(getContext(),RegisterActivity.class); |
|
|
|
|
|
startActivity(intent); |
|
|
|
|
|
} |
|
|
|
|
|
}).show(); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
// we have to show alert |
|
|
// we have to show alert |
|
|
Toast.makeText(getContext(), "Username/password is not matching!", Toast.LENGTH_SHORT).show(); |
|
|
|
|
|
|
|
|
new SweetAlertDialog(getContext(), SweetAlertDialog.WARNING_TYPE) |
|
|
|
|
|
.setTitleText("Username/password is not matching!") |
|
|
|
|
|
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(SweetAlertDialog sDialog) { |
|
|
|
|
|
sDialog.dismissWithAnimation(); |
|
|
|
|
|
} |
|
|
|
|
|
}).show(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} catch (JSONException e) { |
|
|
} catch (JSONException e) { |
|
|