I have a button triggering OnPost action
- var checkIsoCert = await (from a in _context.IsoCerts.Where(s => s.PTWNo == idPTWNo)
- join b in _context.IsoDetails on a.IdIC equals b.IdIC into TempData1
- from c in TempData1
- select new { c.IsStatus }).ToListAsync();
- string myString = "Awaiting";
- var matchingvalues = checkIsoCert.Where(x => x.IsStatus.Equals(myString));
- if(matchingvalues == null)
- {
- var ptwStatus = _context.PTWContents.First(s => s.PTWNo == idPTWNo);
- ptwStatus.PTWStatus = "Issued";
- await _context.SaveChangesAsync();
- return RedirectToPage("PTWForm", "PTWNoId", new { ptwNoId = idPTWNo });
- }
- else
- {
- //show an error message such as -You have not complete IsoCert-
- }


Sachin SinghRank #66 · 26.2K reputationPosted Dec 2, 2020, 5:41 PM EST
Yogeshkumar HadiyaRank #358 · 7K reputationPosted Dec 1, 2020, 6:54 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 1, 2020, 8:33 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 2, 2020, 5:53 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 1, 2020, 8:18 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 1, 2020, 8:40 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 1, 2020, 8:41 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 1, 2020, 8:49 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 1, 2020, 8:55 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 1, 2020, 9:17 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 2, 2020, 12:13 AM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 2, 2020, 2:40 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 2, 2020, 3:28 AM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 2, 2020, 4:30 PM EST
This is an error
Marius VasileRank #785 · 2.9K reputationPosted Dec 2, 2020, 5:18 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 2, 2020, 5:47 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Dec 1, 2020, 7:07 PM EST
Yogeshkumar HadiyaRank #358 · 7K reputationPosted Dec 1, 2020, 7:10 PM EST