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 SinghPosted Dec 2, 2020, 10:41 PM
Marius VasilePosted Dec 2, 2020, 10:53 PM
Marius VasilePosted Dec 2, 2020, 10:47 PM
Marius VasilePosted Dec 2, 2020, 10:18 PM
Marius VasilePosted Dec 2, 2020, 9:30 PM
This is an error
Sachin SinghPosted Dec 2, 2020, 8:28 AM
Marius VasilePosted Dec 2, 2020, 7:40 AM
Marius VasilePosted Dec 2, 2020, 5:13 AM
Sachin SinghPosted Dec 2, 2020, 2:17 AM
Sachin SinghPosted Dec 2, 2020, 1:55 AM
Marius VasilePosted Dec 2, 2020, 1:49 AM
Sachin SinghPosted Dec 2, 2020, 1:41 AM
Marius VasilePosted Dec 2, 2020, 1:40 AM
Sachin SinghPosted Dec 2, 2020, 1:33 AM
Marius VasilePosted Dec 2, 2020, 1:18 AM
Yogeshkumar HadiyaPosted Dec 2, 2020, 12:10 AM
Marius VasilePosted Dec 2, 2020, 12:07 AM
Yogeshkumar HadiyaPosted Dec 1, 2020, 11:54 PM