protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.TaskDetails); title = FindViewById <TextView>(Resource.Id.titleDetails); description = FindViewById <TextView>(Resource.Id.descriptionDetails); workingHours = FindViewById <TextView>(Resource.Id.workingHoursDetails); status = FindViewById <TextView>(Resource.Id.statusDetails); createdDate = FindViewById <TextView>(Resource.Id.createdDateDetails); lastEditDate = FindViewById <TextView>(Resource.Id.lastEditDateDetails); creator = FindViewById <TextView>(Resource.Id.creatorDetails); responsible = FindViewById <TextView>(Resource.Id.responsibleDetails); taskID = Intent.GetIntExtra("taskID", 0); WebServiceClientManager.InitializeWebServiceClient(typeof(TaskModel)); client = WebServiceClientManager.TaskClient; client.GetByIDAsync(taskID); client.GetByIDCompleted += GetByIDTaskCompleted; WebServiceClientManager.InitializeWebServiceClient(typeof(UserModel)); clientUser = WebServiceClientManager.UserClient; clientUser.GetByIDAsync(creatorID); clientUser.GetUserByIDCompleted += GetCreatorCompleted; //clientUser.GetByIDAsync(responsibleID); //clientUser.GetUserByIDCompleted += GetResponsibleCompleted; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.EditUser); userID = Intent.GetIntExtra("userID", 0); WebServiceClientManager.InitializeWebServiceClient(typeof(UserModel)); client = WebServiceClientManager.UserClient; if (userID > 0) { client.GetByIDAsync(userID); client.GetUserByIDCompleted += GetUserByIDCompleted; } username = FindViewById <EditText>(Resource.Id.usernameEdit); password = FindViewById <EditText>(Resource.Id.passwordEdit); firstName = FindViewById <EditText>(Resource.Id.firstNameEdit); lastName = FindViewById <EditText>(Resource.Id.lastNameEdit); admin = FindViewById <CheckBox>(Resource.Id.adminEdit); Button save = FindViewById <Button>(Resource.Id.saveUser); Button delete = FindViewById <Button>(Resource.Id.deleteUser); Button cancel = FindViewById <Button>(Resource.Id.cancelUser); errors = FindViewById <TextView>(Resource.Id.errorsEditUser); save.Click += SaveButtonOnClick; delete.Click += DeleteButtonOnClick; cancel.Click += delegate { Finish(); }; }