protected void btnDelete_Click(object sender, EventArgs e) { if (acc != null && acc.RoleID == 0) { var customer = JsonConvert.DeserializeObject <CustomerModel>(hdfCustomer.Value); if (customer != null) { DiscountCustomerController.Delete(customer.ID); PJUtils.ShowMessageBoxSwAlert("Xóa khách hàng ra khỏi nhóm thành công", "s", true, Page); } } }
protected void btnDelete_Click(object sender, EventArgs e) { string username = Request.Cookies["userLoginSystem"].Value; var acc = AccountController.GetByUsername(username); if (acc != null) { if (acc.RoleID == 0) { int ID = hdfCustomerID.Value.ToInt(0); if (ID > 0) { var c = DiscountCustomerController.GetByID(ID); if (c != null) { DiscountCustomerController.Delete(c.ID); PJUtils.ShowMessageBoxSwAlert("Xóa khách hàng thành công", "s", true, Page); } } } } }