public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Parlour = await _context.Parlour.FirstOrDefaultAsync(m => m.Parlour_ID == id); if (Parlour == null) { return(NotFound()); } return(Page()); }
private void btn_add_Click(object sender, EventArgs e) { if (second_user_interface.BusinessType == "Parlour") { Parlour al = new Parlour(); Control ctls = this.Parent; ctls.Controls.Clear(); ctls.Controls.Add(al); } else { Control ctl = this.Parent; CustomerDetailform cpf = new CustomerDetailform("HD"); ctl.Controls.Clear(); ctl.Controls.Add(cpf); } }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Parlour = await _context.Parlour.FindAsync(id); if (Parlour != null) { _context.Parlour.Remove(Parlour); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
private void btn_back_Click_1(object sender, EventArgs e) { if (second_user_interface.BusinessType == "Parlour") { Parlour al = new Parlour(); Control ctls = this.Parent; ctls.Controls.Clear(); ctls.Controls.Add(al); } else { Control ctls = this.Parent; StockProductList ucp = new StockProductList(); ctls.Controls.Clear(); ctls.Controls.Add(ucp); } }