public Commission_Payment() { if (Product_type.Equals("Book") || Product_type.Equals("Physical_product")) { Console.WriteLine("Commission Payment Generated for the agent"); } }
public async Task <IActionResult> OnGetAsync(long?id) { if (id == null) { return(NotFound()); } Product_type = await _context.Product_type.FirstOrDefaultAsync(m => m.ID == id); if (Product_type == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(long?id) { if (id == null) { return(NotFound()); } Product_type = await _context.Product_type.FindAsync(id); if (Product_type != null) { _context.Product_type.Remove(Product_type); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }