protected void lbtnDelete_Click(object sender, EventArgs e) { List <object> fieldValues = ASPxGridView1_ProductDetail.GetSelectedFieldValues(new string[] { "ID" }); foreach (var item in fieldValues) { _ProductDetailRepo.Remove(Utils.CIntDef(item)); } Response.Redirect("danh-sach-san-pham-chi-tiet.aspx"); }
protected void lbtnDelete_Click(object sender, EventArgs e) { try { _ProductDetailRepo.Remove(id); } catch (Exception) { throw; } Response.Redirect("danh-sach-san-pham-chi-tiet.aspx"); }