Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Ajax.Utility.RegisterTypeForAjax(typeof(UserMaster));

        Session["UMUserName"] = hidUser.Value;

        ImageButton btnSave = ucEmpData.FindControl("ibtnSave") as ImageButton;

        btnSave.Click += new ImageClickEventHandler(btnSave_Click);

        ImageButton btnUserSettingSave = ucSetting.FindControl("ibtnSave") as ImageButton;

        btnUserSettingSave.Click += new ImageClickEventHandler(btnUserSettingSave_Click);

        ImageButton btnUserSecuritySave = ucSecurity.FindControl("ibtnSave") as ImageButton;

        btnUserSecuritySave.Click += new ImageClickEventHandler(btnUserSecuritySave_Click);

        if (!IsPostBack)
        {
            Session["Security"] = employee.GetSecurityCode(Session["UserName"].ToString());

            divEmployee.Style.Add(HtmlTextWriterStyle.Display, "none");
            divUSerSecurity.Style.Add(HtmlTextWriterStyle.Display, "none");
            divUserSetting.Style.Add(HtmlTextWriterStyle.Display, "none");
        }
    }