protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["user"] == null) { Response.Redirect("~/Default.aspx"); } else { if (!new UserSecurity().CheckFormPermission((int)Global.formSecurity.Bonus, Request.Cookies["user"]["Permission"].ToString())) { Response.Redirect("~/HR/UnAuthorized.aspx"); } } Bonuses bonus = new Bonuses(); DataTable dt = bonus.getList(); ASPxGridView1.DataSource = dt; ASPxGridView1.DataBind(); AddSubmitEvent(); if (!IsPostBack) { if (Request.QueryString["alert"] == "success") { Response.Write("<script>alert('تم الحفظ بنجاح.');</script>"); } } }