public async Task <IActionResult> Edit(int id, [Bind("PkPayId,FkWorkspacePay,PayDescription,PayAmount,PayBalance,PayDate,PayDeductions,FinalPay")] TblUserPaymentHistory tblUserPaymentHistory)
        {
            if (id != tblUserPaymentHistory.PkPayId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tblUserPaymentHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TblUserPaymentHistoryExists(tblUserPaymentHistory.PkPayId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FkWorkspacePay"] = new SelectList(_context.TblWorkspace, "PkWkspcId", "WkspcAmountAgreed", tblUserPaymentHistory.FkWorkspacePay);
            return(View(tblUserPaymentHistory));
        }
        public async Task <IActionResult> Create([Bind("PkPayId,FkWorkspacePay,PayDescription,PayAmount,PayBalance,PayDate,PayDeductions,FinalPay")] TblUserPaymentHistory tblUserPaymentHistory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tblUserPaymentHistory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FkWorkspacePay"] = new SelectList(_context.TblWorkspace, "PkWkspcId", "WkspcAmountAgreed", tblUserPaymentHistory.FkWorkspacePay);
            return(View(tblUserPaymentHistory));
        }