{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/HRM_9/pulls/comments/57418375","id":57418375,"diff_hunk":"@@ -0,0 +1,108 @@\n+package com.framgia.humanresourcemanagement.ui;\n+\n+import android.app.Activity;\n+import android.content.Intent;\n+import android.os.Bundle;\n+import android.view.View;\n+import android.widget.Button;\n+import android.widget.EditText;\n+import android.widget.Toast;\n+\n+import com.framgia.humanresourcemanagement.R;\n+import com.framgia.humanresourcemanagement.data.DBManager;\n+import com.framgia.humanresourcemanagement.data.SQL_Const;\n+import com.framgia.humanresourcemanagement.util.Employee;\n+\n+import java.io.Serializable;\n+\n+\n+/**\n+ * Created by PhongTran on 3/21/2016.\n+ */\n+public class EditEmployee extends Activity implements Serializable {\n+    private EditText mEditName;\n+    private EditText mEditAddress, mEditBirthday, mEditPhone, mEditStatus, mEditPosition;\n+    private Button mButtonUpdate, mButtonCancle;\n+    private DBManager mDBManager;\n+    private Employee mEmployee, mEmployee2;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        setContentView(R.layout.edit_employee_layout);\n+        initView();\n+    }\n+\n+    private void initView() {\n+        mEditName = (EditText) findViewById(R.id.edit_name_edit_staff);\n+        mEditAddress = (EditText) findViewById(R.id.edit_address_edit_staff);\n+        mEditBirthday = (EditText) findViewById(R.id.edit_birth_edit_staff);\n+        mEditPhone = (EditText) findViewById(R.id.edit_phone_edit_staff);\n+        mEditStatus = (EditText) findViewById(R.id.edit_status_edit_staff);\n+        mEditPosition = (EditText) findViewById(R.id.edit_position_edit_staff);\n+        mButtonUpdate = (Button) findViewById(R.id.button_update_edit_staff);\n+        mButtonCancle = (Button) findViewById(R.id.button_cancle_edit_staff);\n+\n+        Intent intent = getIntent();\n+        mEmployee = (Employee) intent.getSerializableExtra(InfoActivity.KEY_BOX_EDIT);\n+        Intent intent1 = getIntent();\n+        mEmployee2 = (Employee) intent1.getSerializableExtra(EmployeeActivity.KEY_BOX_EDIT_EM);\n+        if (mEmployee != null) {\n+            mEditName.setText(mEmployee.getName());\n+            mEditAddress.setText(mEmployee.getAddress());\n+            mEditBirthday.setText(mEmployee.getBirthday());\n+            mEditPhone.setText(mEmployee.getPhone());\n+            mEditStatus.setText(mEmployee.getStatus());\n+            mEditPosition.setText(mEmployee.getPosition());\n+        }\n+        if (mEmployee2 != null) {\n+            mEditName.setText(mEmployee2.getName());\n+            mEditAddress.setText(mEmployee2.getAddress());\n+            mEditBirthday.setText(mEmployee2.getBirthday());\n+            mEditPhone.setText(mEmployee2.getPhone());\n+            mEditStatus.setText(mEmployee2.getStatus());\n+            mEditPosition.setText(mEmployee2.getPosition());\n+        }\n+        mButtonCancle.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View v) {\n+                Toast.makeText(getApplicationContext(), \"Cancle is clicked !\", Toast.LENGTH_SHORT).show();\n+                finish();\n+            }\n+        });\n+        mButtonUpdate.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View v) {\n+                mDBManager = new DBManager(getApplicationContext());\n+                Employee e = new Employee(\n+                        mEditName.getText().toString(),\n+                        mEditAddress.getText().toString(),\n+                        mEditBirthday.getText().toString(),\n+                        mEditPhone.getText().toString(),\n+                        mEditStatus.getText().toString(),\n+                        mEditPosition.getText().toString());\n+                boolean result = mDBManager.updateValue(SQL_Const.TABLE_NAME_STAFF,\n+                        new String[]{\n+                                SQL_Const.COLUMN_EMPLOYEE_ADDRESS,\n+                                SQL_Const.COLUMN_EMPLOYEE_BIRTHDAY,\n+                                SQL_Const.COLUMN_EMPLOYEE_PHONE,\n+                                SQL_Const.COLUMN_EMPLOYEE_STATUS,\n+                                SQL_Const.COLUMN_EMPLOYE_POSITION},\n+                        new String[]{\n+                                e.getAddress(),\n+                                e.getBirthday(),\n+                                e.getPhone(),\n+                                e.getStatus(),\n+                                e.getPosition()},\n+                        \"name='\" + e.getName() + \"'\"\n+                );\n+                if (result) {\n+                    Toast.makeText(getApplicationContext(), \"Edit thanh cong !\", Toast.LENGTH_SHORT).show();","path":"app/src/main/java/com/framgia/humanresourcemanagement/ui/EditEmployee.java","position":null,"original_position":100,"commit_id":"081e7613aedd1d544d0a2c5f88ea5d347e9a3f96","original_commit_id":"daab4bd555a917c842664bd1b5569f986294a156","user":{"login":"nhs3108","id":10093701,"avatar_url":"https://avatars.githubusercontent.com/u/10093701?v=3","gravatar_id":"","url":"https://api.github.com/users/nhs3108","html_url":"https://github.com/nhs3108","followers_url":"https://api.github.com/users/nhs3108/followers","following_url":"https://api.github.com/users/nhs3108/following{/other_user}","gists_url":"https://api.github.com/users/nhs3108/gists{/gist_id}","starred_url":"https://api.github.com/users/nhs3108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhs3108/subscriptions","organizations_url":"https://api.github.com/users/nhs3108/orgs","repos_url":"https://api.github.com/users/nhs3108/repos","events_url":"https://api.github.com/users/nhs3108/events{/privacy}","received_events_url":"https://api.github.com/users/nhs3108/received_events","type":"User","site_admin":false},"body":"quen dần cách đặt string vào xml để sử dụng cho đa ngôn ngữ nhé","created_at":"2016-03-25T04:24:21Z","updated_at":"2016-03-25T04:24:21Z","html_url":"https://github.com/framgia/HRM_9/pull/1#discussion_r57418375","pull_request_url":"https://api.github.com/repos/framgia/HRM_9/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/framgia/HRM_9/pulls/comments/57418375"},"html":{"href":"https://github.com/framgia/HRM_9/pull/1#discussion_r57418375"},"pull_request":{"href":"https://api.github.com/repos/framgia/HRM_9/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/HRM_9/pulls/1","id":63517733,"html_url":"https://github.com/framgia/HRM_9/pull/1","diff_url":"https://github.com/framgia/HRM_9/pull/1.diff","patch_url":"https://github.com/framgia/HRM_9/pull/1.patch","issue_url":"https://api.github.com/repos/framgia/HRM_9/issues/1","number":1,"state":"open","locked":false,"title":"57387 task","user":{"login":"TranTrungPhong","id":17716637,"avatar_url":"https://avatars.githubusercontent.com/u/17716637?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTrungPhong","html_url":"https://github.com/TranTrungPhong","followers_url":"https://api.github.com/users/TranTrungPhong/followers","following_url":"https://api.github.com/users/TranTrungPhong/following{/other_user}","gists_url":"https://api.github.com/users/TranTrungPhong/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTrungPhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTrungPhong/subscriptions","organizations_url":"https://api.github.com/users/TranTrungPhong/orgs","repos_url":"https://api.github.com/users/TranTrungPhong/repos","events_url":"https://api.github.com/users/TranTrungPhong/events{/privacy}","received_events_url":"https://api.github.com/users/TranTrungPhong/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-21T02:57:05Z","updated_at":"2016-03-25T04:24:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f54c243983940b34128f260a05ff25e2171b2090","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/HRM_9/pulls/1/commits","review_comments_url":"https://api.github.com/repos/framgia/HRM_9/pulls/1/comments","review_comment_url":"https://api.github.com/repos/framgia/HRM_9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/HRM_9/issues/1/comments","statuses_url":"https://api.github.com/repos/framgia/HRM_9/statuses/081e7613aedd1d544d0a2c5f88ea5d347e9a3f96","head":{"label":"TranTrungPhong:57387_Task","ref":"57387_Task","sha":"081e7613aedd1d544d0a2c5f88ea5d347e9a3f96","user":{"login":"TranTrungPhong","id":17716637,"avatar_url":"https://avatars.githubusercontent.com/u/17716637?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTrungPhong","html_url":"https://github.com/TranTrungPhong","followers_url":"https://api.github.com/users/TranTrungPhong/followers","following_url":"https://api.github.com/users/TranTrungPhong/following{/other_user}","gists_url":"https://api.github.com/users/TranTrungPhong/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTrungPhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTrungPhong/subscriptions","organizations_url":"https://api.github.com/users/TranTrungPhong/orgs","repos_url":"https://api.github.com/users/TranTrungPhong/repos","events_url":"https://api.github.com/users/TranTrungPhong/events{/privacy}","received_events_url":"https://api.github.com/users/TranTrungPhong/received_events","type":"User","site_admin":false},"repo":{"id":54352336,"name":"HRM_9","full_name":"TranTrungPhong/HRM_9","owner":{"login":"TranTrungPhong","id":17716637,"avatar_url":"https://avatars.githubusercontent.com/u/17716637?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTrungPhong","html_url":"https://github.com/TranTrungPhong","followers_url":"https://api.github.com/users/TranTrungPhong/followers","following_url":"https://api.github.com/users/TranTrungPhong/following{/other_user}","gists_url":"https://api.github.com/users/TranTrungPhong/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTrungPhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTrungPhong/subscriptions","organizations_url":"https://api.github.com/users/TranTrungPhong/orgs","repos_url":"https://api.github.com/users/TranTrungPhong/repos","events_url":"https://api.github.com/users/TranTrungPhong/events{/privacy}","received_events_url":"https://api.github.com/users/TranTrungPhong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TranTrungPhong/HRM_9","description":"Human Resource Management Application (training)","fork":true,"url":"https://api.github.com/repos/TranTrungPhong/HRM_9","forks_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/forks","keys_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/teams","hooks_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/hooks","issue_events_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/issues/events{/number}","events_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/events","assignees_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/assignees{/user}","branches_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/branches{/branch}","tags_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/tags","blobs_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/git/refs{/sha}","trees_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/statuses/{sha}","languages_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/languages","stargazers_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/stargazers","contributors_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/contributors","subscribers_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/subscribers","subscription_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/subscription","commits_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/commits{/sha}","git_commits_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/git/commits{/sha}","comments_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/comments{/number}","issue_comment_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/issues/comments{/number}","contents_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/contents/{+path}","compare_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/merges","archive_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/downloads","issues_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/issues{/number}","pulls_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/pulls{/number}","milestones_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/milestones{/number}","notifications_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/labels{/name}","releases_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/releases{/id}","deployments_url":"https://api.github.com/repos/TranTrungPhong/HRM_9/deployments","created_at":"2016-03-21T01:58:50Z","updated_at":"2016-03-18T08:43:04Z","pushed_at":"2016-03-25T04:10:31Z","git_url":"git://github.com/TranTrungPhong/HRM_9.git","ssh_url":"git@github.com:TranTrungPhong/HRM_9.git","clone_url":"https://github.com/TranTrungPhong/HRM_9.git","svn_url":"https://github.com/TranTrungPhong/HRM_9","homepage":null,"size":1086,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"b7e3e30b97baf769ca5f49f95b62b6719a27037a","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":54186916,"name":"HRM_9","full_name":"framgia/HRM_9","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/HRM_9","description":"Human Resource Management Application (training)","fork":false,"url":"https://api.github.com/repos/framgia/HRM_9","forks_url":"https://api.github.com/repos/framgia/HRM_9/forks","keys_url":"https://api.github.com/repos/framgia/HRM_9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/HRM_9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/HRM_9/teams","hooks_url":"https://api.github.com/repos/framgia/HRM_9/hooks","issue_events_url":"https://api.github.com/repos/framgia/HRM_9/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/HRM_9/events","assignees_url":"https://api.github.com/repos/framgia/HRM_9/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/HRM_9/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/HRM_9/tags","blobs_url":"https://api.github.com/repos/framgia/HRM_9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/HRM_9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/HRM_9/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/HRM_9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/HRM_9/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/HRM_9/languages","stargazers_url":"https://api.github.com/repos/framgia/HRM_9/stargazers","contributors_url":"https://api.github.com/repos/framgia/HRM_9/contributors","subscribers_url":"https://api.github.com/repos/framgia/HRM_9/subscribers","subscription_url":"https://api.github.com/repos/framgia/HRM_9/subscription","commits_url":"https://api.github.com/repos/framgia/HRM_9/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/HRM_9/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/HRM_9/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/HRM_9/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/HRM_9/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/HRM_9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/HRM_9/merges","archive_url":"https://api.github.com/repos/framgia/HRM_9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/HRM_9/downloads","issues_url":"https://api.github.com/repos/framgia/HRM_9/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/HRM_9/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/HRM_9/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/HRM_9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/HRM_9/labels{/name}","releases_url":"https://api.github.com/repos/framgia/HRM_9/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/HRM_9/deployments","created_at":"2016-03-18T08:43:04Z","updated_at":"2016-03-18T08:43:04Z","pushed_at":"2016-03-25T04:10:32Z","git_url":"git://github.com/framgia/HRM_9.git","ssh_url":"git@github.com:framgia/HRM_9.git","clone_url":"https://github.com/framgia/HRM_9.git","svn_url":"https://github.com/framgia/HRM_9","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/HRM_9/pulls/1"},"html":{"href":"https://github.com/framgia/HRM_9/pull/1"},"issue":{"href":"https://api.github.com/repos/framgia/HRM_9/issues/1"},"comments":{"href":"https://api.github.com/repos/framgia/HRM_9/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/HRM_9/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/HRM_9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/HRM_9/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/HRM_9/statuses/081e7613aedd1d544d0a2c5f88ea5d347e9a3f96"}}}}