private void BindUserList(int aPageNumber) { DataTable dtb = objSystemUserListBAL.GetUserList(); //Button UserActivate; //Button UserDeactivate; //Button UserLock; //Button UserUnlock; if (dtb.Rows.Count > 0 && dtb != null) { dtb.Columns.Add("JumpParam"); foreach (DataRow item in dtb.Rows) { item["JumpParam"] = "SystemUserEdit.aspx?" + URLMessage.Encrypt("action=update&SystemUser="******"SystemUser"] + "&Referrer=SystemUserList.aspx"); } grdPage.DataSource = dtb; grdPage.DataBind(); grdPage.CurrentPageIndex = aPageNumber > grdPage.PageCount ? 0 : aPageNumber; grdPage.DataBind(); SessionContext.GridPage = grdPage.CurrentPageIndex; msgalert.Visible = false; } else { msgalert.Visible = true; lblmsg.Text = "No Records Found"; grdPage.Visible = false; } }
private void PrepUpdate() { SystemUserId.Value = URLMessage.GetParam("SystemUser", 0).ToString(); btSave.Visible = false; btnClear.Visible = false; txtUserId.Enabled = false; divPassword.Visible = false; GetOrgInfo(); FillRoles(); DataTable dtb = objSystemUserListBAL.GetUser(Convert.ToInt32(SystemUserId.Value)); if (dtb.Rows.Count > 0 && dtb != null) { txtFirstName.Text = dtb.Rows[0]["FirstName"].ToString(); txtLastName.Text = dtb.Rows[0]["LastName"].ToString(); txtEmailAddress.Text = dtb.Rows[0]["EmailAddress"].ToString(); txtCellPhone.Text = dtb.Rows[0]["Phone"].ToString(); txtEduQualification.Text = dtb.Rows[0]["EducationQaulification"].ToString(); txtDateOfBirth.Text = dtb.Rows[0]["DateOfBirth"].ToString(); txtPermanentAddress.Text = dtb.Rows[0]["PermanentAddress"].ToString(); txtCoAddress.Text = dtb.Rows[0]["CorrespondanceAddress"].ToString(); txtUserId.Text = dtb.Rows[0]["UserId"].ToString(); txtPassword.Text = dtb.Rows[0]["Password"].ToString(); drpOrgCode.SelectedValue = dtb.Rows[0]["OrgCode"].ToString(); txtFailedLoginCount.Text = dtb.Rows[0]["FailedLoginCount"].ToString(); if (dtb.Rows[0]["IsActive"].ToString() == "1") { chkIsActive.Checked = true; } GetRoles("exist"); } }
protected void lnkEdit_Click(object sender, System.EventArgs e) { string id = URLMessage.GetParam("SecurityProfile", "0"); if (!id.Equals("0")) { Response.Redirect("../SecurityProfile/SecurityProfileEdit.aspx?" + URLMessage.Encrypt("action=" + URLAction.update.ToString() + "&SecurityProfile=" + id + "&Name=" + URLMessage.GetParam("Name", ""))); } }
protected override void Page_Load(object sender, System.EventArgs e) { base.Page_Load(sender, e); PageCode = "PageMapping"; PageName = "Page Mapping"; if (!Page.IsPostBack) { lblPageName.Text = "Role Page Mapping List for " + URLMessage.GetParam("Name", ""); RowId = URLMessage.GetParam("SecurityProfile", 0); BindRolePageMappingList(SessionContext.GridPage); } }
protected virtual void Page_Load(object sender, System.EventArgs e) { // License.Validate(); CargoBag = new Cargo(ViewState); if (SessionContext.AuthenticationRequired == true) { string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name; if (objPagePrivelegesBAL.GetUserPrivelegesForPage(SessionContext.SystemUser, currentPageFileName) == 0) { Response.Redirect("~/Issue/RestrictedSecurity.aspx"); } else { PagePrivelegesBAL.SecurePage(this, SessionContext.SystemUser, currentPageFileName); } } URLMessage = new URLMessage(); this.Title = "HAMLA ERP SYSTEM"; }
protected void lnkCreate_Click(object sender, System.EventArgs e) { Response.Redirect(PageCode + "Edit.aspx?" + URLMessage.Encrypt("action=create")); }
private void BindRolePageMappingList(int aPageNumber) { DataTable dtb = objRolePageMappingListBAL.GetRolePageMappingList(RowId); if (dtb.Rows.Count > 0 && dtb != null) { dtb.Columns.Add("JumpParam"); foreach (DataRow item in dtb.Rows) { item["JumpParam"] = "../Securityprofile/SecurityDetailEdit.aspx?" + URLMessage.Encrypt("action=update&PageMapping=" + item["PageMapping"] + "&SecurityProfile=" + RowId.ToString() + "&Name=" + URLMessage.GetParam("Name", "")); } grdPage.DataSource = dtb; grdPage.DataBind(); grdPage.CurrentPageIndex = aPageNumber > grdPage.PageCount ? 0 : aPageNumber; grdPage.DataBind(); SessionContext.GridPage = grdPage.CurrentPageIndex; msgalert.Visible = false; } else { msgalert.Visible = true; grdPage.Visible = false; } }