private void LoadUIData() { btnSearch.ToolTip = Resources.Lang.SearchPanel_btnSearch_Hint; btnClear.ToolTip = Resources.Lang.SearchPanel_btnClear_Hint; //HUD if (empAuth.CanAddSubItemInThisPage()) { hud.SetButtonVisible(HudButtonNameEnum.AddNew, true); hud.SetButtonAttribute(HudButtonNameEnum.AddNew, HudButtonAttributeEnum.JsInNavigateUrl, string.Format("popWin('Department-Config.aspx?act={0}', 700, 600);", ConfigFormAction.add)); } //conditions UI //condition vlaues txtKw.Text = c.qsKw; //columns of list btnSortDeptName.Text = Resources.Lang.Col_DeptName; hidSortDeptName.Text = btnSortDeptName.Text; btnSortSortNo.Text = Resources.Lang.Col_SortNo; hidSortSortNo.Text = btnSortSortNo.Text; btnSortEmpTotal.Text = Resources.Lang.Col_EmpTotal; hidSortEmpTotal.Text = btnSortEmpTotal.Text; c.DisplaySortableCols(new string[] { "DeptName", "SortNo", "EmpTotal" }); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Authenticate if (c.qsAct == ConfigFormAction.edit && !(empAuth.CanEditThisPage() || c.IsMyAccount()) || c.qsAct == ConfigFormAction.add && !empAuth.CanAddSubItemInThisPage()) { string jsClose = "closeThisForm();"; ClientScript.RegisterStartupScript(this.GetType(), "invalid", jsClose, true); return; } LoadUIData(); DisplayAccountData(); txtEmpAccount.Focus(); } else { if (txtPsw.Text.Trim() != "") { rfvPswConfirm.Enabled = true; } } LoadTitle(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Authenticate if (c.qsAct == ConfigFormAction.edit && !empAuth.CanEditThisPage() || c.qsAct == ConfigFormAction.add && !empAuth.CanAddSubItemInThisPage()) { string jsClose = "closeThisForm();"; ClientScript.RegisterStartupScript(this.GetType(), "invalid", jsClose, true); return; } LoadUIData(); DisplayDepartmentData(); txtDeptName.Focus(); } LoadTitle(); }
private void LoadUIData() { btnSearch.ToolTip = Resources.Lang.SearchPanel_btnSearch_Hint; btnClear.ToolTip = Resources.Lang.SearchPanel_btnClear_Hint; //HUD if (empAuth.CanAddSubItemInThisPage()) { hud.SetButtonVisible(HudButtonNameEnum.AddNew, true); hud.SetButtonAttribute(HudButtonNameEnum.AddNew, HudButtonAttributeEnum.JsInNavigateUrl, string.Format("popWin('Account-Config.aspx?act={0}', 700, 600);", ConfigFormAction.add)); } //conditions UI LoadEmpRangeUIData(); LoadDeptUIData(); //condition vlaues ddlEmpRange.SelectedValue = c.qsEmpRange.ToString(); ddlDept.SelectedValue = c.qsDeptId.ToString(); txtKw.Text = c.qsKw; //columns of list btnSortDeptName.Text = Resources.Lang.Col_DeptName; hidSortDeptName.Text = btnSortDeptName.Text; btnSortRoleSortNo.Text = Resources.Lang.Col_Role; hidSortRoleSortNo.Text = btnSortRoleSortNo.Text; btnSortEmpName.Text = Resources.Lang.Col_EmpName; hidSortEmpName.Text = btnSortEmpName.Text; btnSortEmpAccount.Text = Resources.Lang.Col_EmpAccount; hidSortEmpAccount.Text = btnSortEmpAccount.Text; btnSortStartDate.Text = Resources.Lang.Col_ValidationDate; hidSortStartDate.Text = btnSortStartDate.Text; btnSortOwnerName.Text = Resources.Lang.Col_OwnerName; hidSortOwnerName.Text = btnSortOwnerName.Text; c.DisplaySortableCols(new string[] { "DeptName", "RoleSortNo", "EmpName", "EmpAccount", "StartDate", "OwnerName" }); }