Exemplo n.º 1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            Work = await WorkSheetLogic.GetWorkByIdAsync(Work.Id);

            Work.StateId = 2;

            await WorkSheetLogic.ModifyWorkAsync(Work);

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 2
0
        public async Task<IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return Page();
            }

            WorkerUser workerUser = await UserLogic.GetWorkerUserAsync(User);

            Work = await WorkSheetLogic.GetWorkByIdAsync(Work.Id);
            Work.Price = Price;
            Work.StateId = 1;

            await WorkSheetLogic.ModifyWorkAsync(Work);

            await _emailLogic.SendStatusChangeEmailAsync(workerUser, Work);

            return RedirectToPage("./WorkSheets");
        }
Exemplo n.º 3
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            WorkerUser workerUser = await UserLogic.GetWorkerUserAsync(User);

            Service = await CompanyLogic.GetServiceByIdAsync(Service.Id);

            foreach (var work in Service.Works)
            {
                work.StateId = 6;
                await WorkSheetLogic.ModifyWorkAsync(work);
            }

            await _emailLogic.SendStatusChangeEmailAsync(Service);

            return(RedirectToPage("./Index"));
        }