protected void Page_Load(object sender, System.EventArgs e)
 {
     btnClose.Attributes.Add("onclick", "if(confirm('Do you really want to exit?')==false){return false;} this.value='Wait...';this.disabled = true;" + GetPostBackEventReference(btnClose));
     btnSave.Attributes.Add("onclick", "this.value='Wait...';this.disabled=true;" + GetPostBackEventReference(btnSave));
     try
     {
         GeneralTools.ValidateUser.ValidateUserSession("Hurix");
         if (!(IsPostBack))
         {
             Session["HelpFile"] = "../Help/ActivityRoleMapping.htm";
             Session["Msg"]      = null;
             BusinessActivityRole objBusinessActivityRole = new BusinessActivityRole();
             rowRoleNameText.Visible = false;
             objBusinessActivityRole.FillRolesData(ref ddlRoleName, 0);
             objBusinessActivityRole.PopulateMenuTree(TvwProductTree);
             ViewState.Add("ModeofOperation", "UPDATE");
         }
         ddlRoleName.Focus();
         Form2.Attributes.Add("onkeypress", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnSave.UniqueID + "').click();return false;}} else {return true}; ");
     }
     catch (System.Exception ex)
     {
         GeneralTools.ExceptionLogger.ExceptionLog(ex);
         Response.Redirect("../ErrorPages/ErrorPage.aspx");
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     btnDelete.Attributes.Add("onclick", "if(confirm('Do you really want to delete this role?')==false){return false;} this.value='Wait...';this.disabled = true;" + GetPostBackEventReference(btnDelete));
     try
     {
         //if (txtRoleName.Visible == true)
         //{
         //    RFVRoleNameText.Enabled = true;
         //    REVRoleNameText.Enabled = true;
         //}
         //else
         //{
         //    RFVRoleNameText.Enabled = false;
         //    REVRoleNameText.Enabled = false;
         //}
         GeneralTools.ValidateUser.ValidateUserSession("Hurix");
         if (!(IsPostBack))
         {
             Session["HelpFile"] = "../Help/DeleteRole.htm";
             Session["Msg"]      = null;
             BusinessActivityRole objBusinessActivityRole = new BusinessActivityRole();
             rowRoleNameText.Visible = false;
             objBusinessActivityRole.FillRolesData(ref ddlRoleName, 0);
         }
         ddlRoleName.Focus();
         Form2.Attributes.Add("onkeypress", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnDelete.UniqueID + "').click();return false;}} else {return true}; ");
     }
     catch (System.Exception ex)
     {
         GeneralTools.ExceptionLogger.ExceptionLog(ex);
         Response.Redirect("../ErrorPages/ErrorPage.aspx");
     }
 }