|
|
@ -28,7 +28,9 @@ import org.json.JSONArray; |
|
|
|
import org.json.JSONException; |
|
|
|
import org.json.JSONObject; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
@ -55,6 +57,8 @@ public class PermissionRequestActivity extends AppCompatActivity { |
|
|
|
String Employeeid,Permission_code_o,Permission_code_p; |
|
|
|
String fromDate,toDate,fromTime,toTime; |
|
|
|
|
|
|
|
String currentDateandTime; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
@ -71,6 +75,12 @@ public class PermissionRequestActivity extends AppCompatActivity { |
|
|
|
PermissionApprovalList(); |
|
|
|
PermissionTypes(); |
|
|
|
|
|
|
|
//SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z"); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
|
|
|
currentDateandTime = sdf.format(new Date()); |
|
|
|
|
|
|
|
System.out.println("Current date and time "+currentDateandTime); |
|
|
|
|
|
|
|
|
|
|
|
spinner = findViewById(R.id.spinner); |
|
|
|
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.spinner_items, android.R.layout.simple_spinner_item); |
|
|
@ -236,13 +246,12 @@ public class PermissionRequestActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
params.put("employeeid", Employeeid); |
|
|
|
params.put("eleavetype", permission_code); |
|
|
|
params.put("datedaytype", "Today"); |
|
|
|
params.put("pdate", currentDateandTime); |
|
|
|
params.put("fromtime", textTimeFrom.getText().toString()); |
|
|
|
params.put("totime", textTimeTo.getText().toString()); |
|
|
|
params.put("reason", remarks); |
|
|
|
params.put("attachment", ""); |
|
|
|
params.put("userid", "a"); |
|
|
|
params.put("@LDate1", ""); |
|
|
|
if(permission_code.equals("O")){ |
|
|
|
params.put("startdate", fromDate); |
|
|
|
params.put("enddate", toDate); |
|
|
|