Exemplo n.º 1
0
        private void btnPost_Click(object sender, EventArgs e)
        {
            JobPostInfo data = new JobPostInfo();

            data.title                = this.txtJobTitle.TextName;
            data.area                 = this.txtAddress.TextName;
            data.duration             = Int32.Parse(this.txtDuration.TextName);
            data.payment              = Int32.Parse(this.txtPrice.TextName);
            this.cboDate.Format       = DateTimePickerFormat.Custom;
            this.cboDate.FormatCustom = "DD/MM/YYYY";
            data.startTime            = this.cboTime.Value.ToShortTimeString();
            data.date                 = this.cboDate.Value.ToShortDateString();
            data.description          = this.txtDescription.Text;
            mPresenter.onPressPost(data);
        }
Exemplo n.º 2
0
        public async Task uploadJobPost(JobPostInfo data)
        {
            string  timeStamp = DateTime.Now.ToFileTime().ToString();
            JobPost post      = new JobPost();

            post.info              = data;
            post.postId            = timeStamp;
            post.info.uploadedTime = timeStamp;
            post.info.uploadedUser = currentUser;
            post.jobStatus         = AppConstants.JobStatus.APPLICABLE;

            //Upload Job Post to CHORES
            await Client.Child(DataPoints.CHORES)
            .Child(timeStamp)
            .PutAsync(post);

            //Add Job Post to employer's active jobs
            await Client.Child(DataPoints.USERS)
            .Child(currentUser.userName)
            .Child(DataPoints.ACTIVE_JOBS)
            .Child(data.uploadedTime)
            .PutAsync(post);
        }
Exemplo n.º 3
0
        public async void onPressPost(JobPostInfo data)
        {
            await dataModel.uploadJobPost(data);

            mView.navigateToHomeScreen();
        }