protected void btnLogin_Click(object sender, EventArgs e) { DateTime currentDate = DateTime.Now; if (Request.Cookies["usernameLoginSystem"] != null) { string username = Request.Cookies["usernameLoginSystem"].Value; var acc = AccountController.GetByUsername(username); if (acc != null) { if (acc.RoleID == 0) { var kq = DiscountController.insert(txtQuantity.Text.ToInt(), txtDiscountPerProduct.Text.ToInt(), username); if (kq != null) { PJUtils.ShowMessageBoxSwAlert("Tạo mới thành công", "s", true, Page); } } } } else { Response.Redirect("/dang-nhap"); } }