LoginActivity.java
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.huaheng.wms;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.huaheng.wms.https.WMSHttpInterface;
import org.json.JSONException;
import org.json.JSONObject;
public class LoginActivity extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
insertCompany();
}
private void insertCompany() {
JSONObject object = new JSONObject();
try {
object.put("address1", "长沙市");
object.put("address2", "浏阳市");
object.put("attentionTo", "string");
object.put("city", "浏阳市");
object.put("country", "湖南省");
object.put("created", "2018-07-23T03:56:29.108Z");
object.put("createdBy", "string");
object.put("deleted", true);
object.put("email", "string");
object.put("enable", true);
object.put("faxNum", "string");
object.put("id", 0);
object.put("kind", "string");
object.put("lastUpdated", "2018-07-23T11:59:40.704Z");
object.put("mobile", "string");
object.put("name", "string");
object.put("phoneNum", "string");
object.put("postalCode", "string");
object.put("province", "string");
object.put("type", "string");
object.put("userDef1", "string");
object.put("userDef2", "string");
object.put("userDef3", "string");
} catch (JSONException e) {
e.printStackTrace();
}
WMSHttpInterface.insertCompany(object);
}
}