protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); WebServiceClientManager.InitializeWebServiceClient(typeof(CommentModel)); client = WebServiceClientManager.CommentClient; taskID = Intent.GetIntExtra("taskID", 0); SetContentView(Resource.Layout.CreateComment); text = FindViewById <EditText>(Resource.Id.commentEdit); Button save = FindViewById <Button>(Resource.Id.saveComment); save.Click += SaveButtonOnClick; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); WebServiceClientManager.InitializeWebServiceClient(typeof(CommentModel)); client = WebServiceClientManager.CommentClient; taskID = Intent.GetIntExtra("taskID", 0); SetContentView(Resource.Layout.Comments); PopulateListView(); Button create = FindViewById <Button>(Resource.Id.createComment); create.Click += CreateButtonOnClick; }
public static void InitializeWebServiceClient(Type type) { if (type == typeof(UserModel)) { UserClient = new BaseServicesOf_UserModelClient(CreateBasicHttp(), UserEndPoint); } else if (type == typeof(TaskModel)) { TaskClient = new BaseServicesOf_TaskModelClient(CreateBasicHttp(), TaskEndPoint); } else if (type == typeof(LogworkModel)) { LogworkClient = new BaseServicesOf_LogworkModelClient(CreateBasicHttp(), LogworkEndPoint); } else if (type == typeof(CommentModel)) { CommentClient = new BaseServicesOf_CommentModelClient(CreateBasicHttp(), CommentEndPoint); } }