コード例 #1
0
 public Commission_Payment()
 {
     if (Product_type.Equals("Book") || Product_type.Equals("Physical_product"))
     {
         Console.WriteLine("Commission Payment Generated for the agent");
     }
 }
コード例 #2
0
ファイル: Edit.cshtml.cs プロジェクト: IamEFF/Buzz_Lightyear
        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());
        }
コード例 #3
0
        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"));
        }