public JsonResult DeleteSelectedDb(string ids) { var model = new ContentDAO(); var lstID = ids.Split(',');//chuyển chuỗi thành mảng bool res = true; foreach (var id in lstID) { long cv = Convert.ToInt64(id); res = model.Delete(cv); } return(Json(new { status = res })); }
protected void lv_ThongTinSP_ItemDeleting(object sender, ListViewDeleteEventArgs e) { if (objCheckPermision.Permission(objCheckPermision.LayQuyen("strTinhNang_Xoa"))) { var hdf = (lv_ThongTinSP.Items[e.ItemIndex].FindControl("hfID")) as HiddenField; if (hdf != null) { ContentDAO.Delete(Int32.Parse(hdf.Value)); lv_ThongTinSP.EditIndex = -1; BinList(); } } else { iRightAccess.Visible = false; objControl.LoadMyControl(idNotPermissionAccess, NotPermissControl); } }