protected void btpageUpdate_Click(object sender, System.EventArgs e)
        {
            try
            {
                PageFormUI objPageFormUI = new PageFormUI();
                objPageFormUI.PageMappingX = txtPageMappingX.Text.Trim();
                objPageFormUI.UpdatedOn    = DateTime.Now;
                //objsecurityProfileFormUI.createdBySystemUser = "******";
                //objsecurityProfileFormUI.updatedBySystemUser = "******";

                if (objPageFormBAL.UpdatePage(objPageFormUI, RowId = URLMessage.GetParam(PageCode, 0)) == -1)
                {
                    //Response.Redirect("OrganizationList.aspx");
                    msgcool.Visible = true;
                    lbsuccess.Text  = "Profile name has been updated";
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
                }
                else
                {
                    lblMsg.Text      = "Could not process the request, Please try again";
                    msgalert.Visible = true;
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
                }
            }
            catch (Exception exp)
            {
                //logExcpUIobj.MethodName = "btprofileUpdate_Click()";
                //logExcpUIobj.ResourceName = "System_Security_SecurityProfileEdit.CS";
                //logExcpUIobj.RecordId = "";
                //logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
                //logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

                //log.Error("[System_Security_SecurityProfileEditForm : btprofileUpdate_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
            }
        }
        protected void btdeleteControl_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (objPageControlFormBAL.DeleteControl(RowId = URLMessage.GetParam(PageCode, 0)) == -1)
                {
                    //Response.Redirect("OrganizationList.aspx");
                    msgcool.Visible = true;
                    lbsuccess.Text  = "Control has been deleted";
                    txtControlMappingCode.Visible = false;
                    txtControlMappingX.Visible    = false;
                }
                else
                {
                    lblMsg.Text      = "Could not process the request, Please try again";
                    msgalert.Visible = true;
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
                }
            }
            catch (Exception exp)
            {
                //logExcpUIobj.MethodName = "btprofileUpdate_Click()";
                //logExcpUIobj.ResourceName = "System_Security_SecurityProfileEdit.CS";
                //logExcpUIobj.RecordId = "";
                //logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
                //logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

                //log.Error("[System_Security_SecurityProfileEditForm : btprofileUpdate_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
            }
        }
 private void PrepCreate()
 {
     lblPageName.Text = "Add New Control";
     btDelete.Visible = false;
     btUpdate.Visible = false;
     txtControlMappingCode.Enabled = true;
     RowId    = int.MinValue;
     ParentId = URLMessage.GetParam("PageMapping", -1);
 }
Ejemplo n.º 4
0
        protected void lnkEdit_Click(object sender, System.EventArgs e)
        {
            string id = URLMessage.GetParam(PageCode, "0");

            if (!id.Equals("0"))
            {
                Response.Redirect(PageCode + "Edit.aspx?" + URLMessage.Encrypt("action=" + URLAction.update.ToString() + "&" + PageCode + "=" + id));
            }
        }
Ejemplo n.º 5
0
        private void GetControlListEdit()
        {
            DataTable dtb = objPrivilegesDetailsBAL.GetPrivilegesDetails(URLMessage.GetParam("SecurityProfile", -1), URLMessage.GetParam("PageMapping", -1));

            if (dtb.Rows.Count > 0 && dtb != null)
            {
                lblSearchHeaderText.Text     = dtb.Rows[0]["RoleName"].ToString() + " > " + dtb.Rows[0]["PageName"].ToString() + " > Edit Controls";
                grdSecurityDetail.DataSource = dtb;
                grdSecurityDetail.DataBind();
            }
            else
            {
                msgalert.Visible = true;
            }
        }
        private void PrepUpdate()
        {
            lblSearchHeaderText.Text = "Edit Page";
            btnclear.Visible         = false;
            btSave.Visible           = false;
            RowId = URLMessage.GetParam(PageCode, 0);
            DataTable dtb = new DataTable();

            RowId = URLMessage.GetParam(PageCode, 0);
            dtb   = objPageListBAL.GetPage(RowId);

            if (dtb.Rows.Count > 0)
            {
                txtPageMappingX.Text = dtb.Rows[0]["PageMappingX"].ToString();
            }
            else
            {
                msgalert.Visible = true;
                lblMsg.Text      = "Could not process the request, Please try again";
            }
        }
Ejemplo n.º 7
0
        private void PrepUpdate()
        {
            btDelete.Visible = true;
            btnclear.Visible = false;
            btSave.Visible   = false;

            DataTable dtb = new DataTable();

            RowId = URLMessage.GetParam(PageCode, 0);
            dtb   = objSecurityProfileListBAL.GetSecurityProfile(RowId);

            if (dtb.Rows.Count > 0)
            {
                txtSecurityProfileX.Text = dtb.Rows[0]["SecurityProfileX"].ToString();
            }
            else
            {
                msgalert.Visible = true;
                lbmsg.Text       = "Could not process the request, Please try again";
            }
        }
Ejemplo n.º 8
0
        protected void btnSavePageControlMapping_Click(object sender, System.EventArgs e)
        {
            if (objPrivilegesDetailsBAL.RemoveProfilePageControlMapping(URLMessage.GetParam("SecurityProfile", -1), URLMessage.GetParam("PageMapping", -1)) == -1)
            {
                for (int i = 0; i < grdSecurityDetail.Items.Count; i++)
                {
                    RadioButtonList rblShippers = (RadioButtonList)grdSecurityDetail.Items[i].Cells[0].FindControl("optControlState");

                    string ControlId = grdSecurityDetail.Items[i].Cells[0].Text;
                    if (objPrivilegesDetailsBAL.AddProfilePageControlMapping(URLMessage.GetParam("SecurityProfile", -1), URLMessage.GetParam("PageMapping", -1), Convert.ToInt32(ControlId), rblShippers.SelectedValue) == 1)
                    {
                        msgcool.Visible = true;
                        lbsuccess.Text  = "Profile Page Control Mapping completed successfully";
                    }
                    else
                    {
                        msgalert.Visible = true;
                        lblmsg.Text      = "Could not process your request, Please try again";
                    }
                }
            }
        }
 private void BindPageControlList()
 {
     RowId = URLMessage.GetParam(PageCode, 0);
     dtb   = objPageControlListBAL.getPageControlList(RowId);
     if (dtb.Rows.Count > 0 && dtb != null)
     {
         lblPageMappingX.Text = dtb.Rows[0]["PageMappingX"].ToString().Replace(".aspx", " Page Control List");
         dtb.Columns.Add("JumpParam");
         foreach (DataRow item in dtb.Rows)
         {
             item["JumpParam"] = "ControlMappingEdit.aspx?" + URLMessage.Encrypt("action=update&ControlMapping=" + item["ControlMapping"]);
         }
         grdControlMapping.DataSource = dtb;
         grdControlMapping.DataBind();
         msgalert.Visible = false;
     }
     else
     {
         msgalert.Visible          = true;
         lblmsg.Text               = "No Records Found";
         grdControlMapping.Visible = false;
     }
 }
        private void PrepUpdate()
        {
            btDelete.Visible = true;
            btnclear.Visible = false;
            btSave.Visible   = false;

            DataTable dtb = new DataTable();

            RowId = URLMessage.GetParam("ControlMapping", 0);

            dtb = objPageControlListBAL.getPageControl(RowId);

            if (dtb.Rows.Count > 0)
            {
                ParentId = (int)dtb.Rows[0]["PageMapping"];
                txtControlMappingX.Text    = dtb.Rows[0]["ControlMappingX"].ToString();
                txtControlMappingCode.Text = dtb.Rows[0]["ControlMappingCode"].ToString();
            }
            else
            {
                msgalert.Visible = true;
                lblMsg.Text      = "Could not process the request, Please try again";
            }
        }
Ejemplo n.º 11
0
 protected void btnBack_Click(object sender, System.EventArgs e)
 {
     Response.Redirect("../PageMapping/RolePageMappingList.aspx?" + URLMessage.Encrypt("action=view&SecurityProfile=" + URLMessage.GetParam("SecurityProfile", "0") + "&Name=" + URLMessage.GetParam("Name", "")));
 }