Example #1
0
        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.Deductions, Request.Cookies["user"]["Permission"].ToString()))
                {
                    Response.Redirect("~/HR/UnAuthorized.aspx");
                }
            }
            Bonuses   bonus = new Bonuses();
            DataTable dt    = bonus.getListDeduction();

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
            AddSubmitEvent();
            if (!IsPostBack)
            {
                if (Request.QueryString["alert"] == "success")
                {
                    Response.Write("<script>alert('تم الحفظ بنجاح.');</script>");
                }
            }
        }