protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } toolBar.FunctionCode = FUNCTION_CODE; if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } AddPanel.Visible = IsAllowEdit; binding = new Binding(dbConn, db); binding.add(PositionCode); binding.add(PositionDesc); binding.add(PositionCapacity); binding.init(Request, Session); sbinding = new SearchBinding(dbConn, db); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { panelRollbackOption.Visible = false; } else { panelRollbackOption.Visible = true; } btnRollback.OnClientClick = HROne.Translation.PromptMessage.PAYROLL_ROLLBACK_PAYROLL_PERIOD_GENERIC_JAVASCRIPT; payPeriodSBinding = new SearchBinding(dbConn, db); // Start 0000069, KuangWei, 2014-08-26 //payPeriodSBinding.add(new DropDownVLSearchBinder(PayGroupID, "PayGroupID", EPayrollGroup.VLPayrollGroup, false)); initPayrollGroup(); // End 0000069, KuangWei, 2014-08-26 payPeriodSBinding.initValues("PayPeriodConfirmBy", null, EUser.VLUserName, null); payPeriodSBinding.init(DecryptedRequest, null); payPeriodInfo = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); if (!Page.IsPostBack) { payperiodView = payPeriodLoadData(payPeriodInfo, EPayrollPeriod.db, payPeriodRepeater); } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } toolBar.FunctionCode = FUNCTION_CODE; if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } AddPanel.Visible = IsAllowEdit; HolidayImport.Visible = IsAllowEdit; binding = new Binding(dbConn, db); binding.add(new TextBoxBinder(db, PublicHolidayDate.TextBox, PublicHolidayDate.ID)); binding.add(PublicHolidayDesc); binding.init(Request, Session); sbinding = new SearchBinding(dbConn, db); sbinding.add(new DropDownVLSearchBinder(YearSelect, "YEAR(PublicHolidayDate)", new WFYearList(15, 5), false)); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } toolBar.FunctionCode = FUNCTION_CODE; SelectAllPanel.Visible = toolBar.DeleteButton_Visible; binding = new SearchBinding(dbConn, db); binding.add(new LikeSearchBinder(UserGroupName, "UserGroupName")); binding.add(new LikeSearchBinder(UserGroupDesc, "UserGroupDesc")); binding.init(DecryptedRequest, null); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); info = ListFooter.ListInfo; if (!Page.IsPostBack) { view = loadData(info, db, Repeater); } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; ConfirmPayrollSelectAllPanel.Visible = false; } Year.Attributes.Add("onchange", "year=parseInt(" + Year.ClientID + ".value); if (!(year>1900)) {if (" + Year.ClientID + ".value!='') alert('Invalid Year');return true; }if (" + Month.ClientID + ".selectedIndex==0) return true;"); Month.Attributes.Add("onchange", "year=parseInt(" + Year.ClientID + ".value); if (!(year>1900)) return true;"); Year2.Attributes.Add("onchange", "year2=parseInt(" + Year2.ClientID + ".value); if (!(year2>1900)) {if (" + Year2.ClientID + ".value!='') alert('Invalid Year');return true; }if (" + Month2.ClientID + ".selectedIndex==0) return true;"); Month2.Attributes.Add("onchange", "year2=parseInt(" + Year2.ClientID + ".value); if (!(year2>1900)) return true;"); sbinding = new SearchBinding(dbConn, db); sbinding.init(DecryptedRequest, null); binding = new SearchBinding(dbConn, EEmpCostCenter.db); binding.add(new DropDownVLSearchBinder(Month, "Month", Values.VLMonth)); binding.add(new DropDownVLSearchBinder(Month2, "Month", Values.VLMonth)); binding.init(DecryptedRequest, null); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } m_IsAllowWrite = WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite); RosterClientSiteSBinding = new SearchBinding(dbConn, ERosterClientSite.db); if (!IsPostBack) { rosterClientSiteloadData(); } HtmlLink cssLink = new HtmlLink(); cssLink.Href = "~/CSS/RadScheduler.css"; cssLink.Attributes.Add("rel", "stylesheet"); cssLink.Attributes.Add("type", "text/css"); Header.Controls.Add(cssLink); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { //Start 0000173, Miranda, 2015-06-03 this.Page.Form.DefaultButton = "mainContentPlaceHolder$Jump"; //End 0000173, Miranda, 2015-06-03 if (!Page.IsPostBack) { //prevPage = Request.UrlReferrer.ToString(); } if (!WebUtils.CheckAccess(Response, Session)) { return; } toolBar.FunctionCode = FUNCTION_CODE; if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { Emp_PersonalInfo1.Visible = false; } if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } EmpID.Value = CurID.ToString(); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); HROne.ProductLicense productLicense = WebUtils.productLicense(Session); if (productLicense.ProductType == HROne.ProductLicense.ProductLicenseType.iMGR) { IsAllowAddRow = false; } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { AddPanel.Visible = false; AddPanelSelectAll.Visible = false; } Delete.OnClientClick = HROne.Translation.PromptMessage.CreateDeleteConfirmDialogJavascript(Delete); if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } EmpID.Value = CurID.ToString(); DBFilter leaveYearFilter = new DBFilter(); leaveYearFilter.add(new Match("EmpID", CurID)); sbinding = new SearchBinding(dbConn, sdb); sbinding.add(new DropDownVLSearchBinder(Year, "Year(CompensationLeaveEntitleEffectiveDate)", ECompensationLeaveEntitle.VLLeaveEntitleYear).setFilter(leaveYearFilter));//, null, "Year(pp.PayPeriodFR)")); //sbinding.initValues("LeaveApplicationID", null, ELeaveApplication.VLLeaveApplication, HROne.Common.WebUtility.GetSessionCultureInfo(Session)); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; }
protected void Page_Load(object sender, EventArgs e) { //Add binding = new Binding(dbConn, db); binding.add(AttendancePlanID); binding.add(new DropDownVLBinder(db, PaymentCodeID, EPaymentCode.VLPaymentCode)); binding.add(AttendancePlanAdditionalPaymentAmount); binding.add(AttendancePlanAdditionalPaymentMaxLateMins); binding.add(AttendancePlanAdditionalPaymentMaxEarlyLeaveMins); binding.add(AttendancePlanAdditionalPaymentMinOvertimeMins); binding.add(AttendancePlanAdditionalPaymentRosterAcrossTime); binding.init(Request, Session); sbinding = new SearchBinding(dbConn, db); sbinding.add(new HiddenMatchBinder(AttendancePlanID)); sbinding.initValues("PaymentCodeID", null, EPaymentCode.VLPaymentCode, null); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; //if (!int.TryParse(DecryptedRequest["AttendancePlanID"], out CurID)) // CurID = -1; Delete.OnClientClick = HROne.Translation.PromptMessage.CreateDeleteConfirmDialogJavascript(Delete); IsAllowEdit = WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite); AttendancePlanAdditionalPaymentRosterAcrossTime.MaxLength = 0; }
//WFValueList functionList = new AppUtils.NewWFTextList( // new string[] { // "PER001", // "PER002", // "PER003" // }, // new string[] { // "Personal Information", // "Position Information", // "Terminated" } // ); protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } foreach (string functionCode in export_Function_List) { CheckBox functionCheckBox = (CheckBox)this.FunctionList.FindControl(FUNCTION_CHECKBOX_PREFIX + functionCode); if (!WebUtils.CheckPermission(Session, functionCode.Replace("_", "-"), WebUtils.AccessLevel.Read)) { functionCheckBox.Visible = false; functionCheckBox.Checked = false; } else { functionCheckBox.Visible = true; } } empSBinding = new SearchBinding(dbConn, EEmpPersonalInfo.db); empSBinding.initValues("EmpStatus", null, EEmpPersonalInfo.VLEmpStatus, HROne.Common.WebUtility.GetSessionUICultureInfo(Session)); empSBinding.init(DecryptedRequest, null); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); empInfo = ListFooter.ListInfo; empInfo.recordPerPage = 0; }
protected void Page_Load(object sender, EventArgs e) { PreRender += new EventHandler(Emp_Common_PreRender); binding = new Binding(dbConn, db); binding.add(EmpID); binding.add(EmpNo); binding.add(EmpChiFullName); binding.add(EmpEngSurname); binding.add(EmpEngOtherName); binding.add(EmpAlias); binding.add(new HKIDLabel(db, EmpHKID, "EmpHKID")); binding.add(EmpDateOfBirth); binding.add(EmpDateOfJoin); binding.add(EmpServiceDate); binding.add(new LabelVLBinder(db, EmpGender, Values.VLGender)); binding.add(new LabelVLBinder(db, EmpStatus, EEmpPersonalInfo.VLEmpStatus)); binding.add(new CheckBoxBinder(db, EmpIsCombinePaySlip)); binding.add(new CheckBoxBinder(db, EmpIsCombineMPF)); binding.add(new CheckBoxBinder(db, EmpIsCombineTax)); binding.init(Request, Session); PrivateSection.Visible = WebUtils.CheckPermission(Session, "PER001", WebUtils.AccessLevel.Read); if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { AllowEditPanel.Visible = false; m_IsAllowEdit = false; } AllowEditPanel.Visible = m_IsAllowEdit; PreRender += new EventHandler(Emp_WorkingExperience_List_PreRender); sbinding = new SearchBinding(dbConn, sdb); sbinding.initValues("EmpWorkExpFromMonth", null, Values.VLMonth, HROne.Common.WebUtility.GetSessionUICultureInfo(Session)); sbinding.initValues("EmpWorkExpToMonth", null, Values.VLMonth, HROne.Common.WebUtility.GetSessionUICultureInfo(Session)); sbinding.init(DecryptedRequest, null); if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } EmpID.Value = CurID.ToString(); info = ListFooter.ListInfo; }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { AllowEditPanel.Visible = false; m_IsAllowEdit = false; } AllowEditPanel.Visible = m_IsAllowEdit; PreRender += new EventHandler(Emp_Beneficiaries_List_PreRender); sbinding = new SearchBinding(dbConn, sdb); sbinding.init(DecryptedRequest, null); if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } EmpID.Value = CurID.ToString(); info = ListFooter.ListInfo; }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; AllowEditPanel.Visible = false; AllowEditPanel2.Visible = false; } PreRender += new EventHandler(Emp_FinalPayment_List_PreRender); sbinding = new SearchBinding(dbConn, sdb); sbinding.initValues("PayCodeID", null, EPaymentCode.VLPaymentCode, null); sbinding.initValues("EmpFinalPayMethod", null, Values.VLPaymentMethod, null); sbinding.initValues("EmpFinalPayIsRestDayPayment", null, Values.VLYesNo, null); sbinding.initValues("EmpFinalPayIsAutoGen", null, Values.VLYesNo, null); sbinding.initValues("CostCenterID", null, ECostCenter.VLCostCenter, null); sbinding.init(DecryptedRequest, null); HROne.Common.WebUtility.WebControlsLocalization(this.Session, this.Controls); if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } Delete.OnClientClick = HROne.Translation.PromptMessage.CreateDeleteConfirmDialogJavascript(Delete); Generate.OnClientClick = HROne.Translation.PromptMessage.CreateConfirmDialogJavascript(HROne.Common.WebUtility.GetLocalizedString("All final payment previously generated will be lost.\r\nStill Continue?"), Generate); EmpID.Value = CurID.ToString(); CostCenterHeaderCell.Visible = WebUtils.productLicense(Session).IsCostCenter; info = ListFooter.ListInfo; }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } toolBar.FunctionCode = FUNCTION_CODE; if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } AddPanel.Visible = IsAllowEdit; binding = new Binding(dbConn, db); binding.add(CessationReasonCode); binding.add(CessationReasonDesc); binding.add(new CheckBoxBinder(db, CessationReasonIsSeverancePay)); binding.add(new CheckBoxBinder(db, CessationReasonIsLongServicePay)); binding.add(new CheckBoxBinder(db, CessationReasonHasProrataYEB)); binding.init(Request, Session); sbinding = new SearchBinding(dbConn, db); sbinding.init(DecryptedRequest, null); sbinding.initValues("CessationReasonIsSeverancePay", null, Values.VLYesNo, null); sbinding.initValues("CessationReasonIsLongServicePay", null, Values.VLYesNo, null); sbinding.initValues("CessationReasonHasProrataYEB", null, Values.VLYesNo, null); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } if (!int.TryParse(DecryptedRequest["LeaveTypeID"], out CurLeaveTypeID)) { CurLeaveTypeID = -1; } EmpID.Value = CurID.ToString(); sbinding = new SearchBinding(dbConn, sdb); //sbinding.initValues("LeaveApplicationID", null, ELeaveApplication.VLLeaveApplication, HROne.Common.WebUtility.GetSessionCultureInfo(Session)); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; }
protected void Page_Load(object sender, EventArgs e) { btnUndo.OnClientClick = HROne.Translation.PromptMessage.CreateConfirmDialogJavascript(HROne.Common.WebUtility.GetLocalizedString("PAYROLL_UNDO_CLICK_MESSAGE", ci), btnUndo); if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { toolBar.CustomButton1_Visible = false; } sbinding = new SearchBinding(dbConn, EEmpPersonalInfo.db); sbinding.add(new HiddenMatchBinder(CAImportBatchID)); sbinding.init(DecryptedRequest, null); binding = new Binding(dbConn, ECommissionAchievementImportBatch.db); binding.add(CAImportBatchDateTime); binding.add(CAImportBatchID); binding.add(new LabelVLBinder(ECommissionAchievementImportBatch.db, CAImportBatchUploadedBy, EUser.VLUserName)); binding.add(CAImportBatchRemark); binding.init(Request, Session); if (!int.TryParse(DecryptedRequest["CAImportBatchID"], out CurID)) { CurID = -1; } info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } toolBar.FunctionCode = FUNCTION_CODE; if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { //AddPanel.Visible = false; IsAllowEdit = false; } //binding = new Binding(dbConn, db); //binding.add(AuthorizationCode); //binding.add(AuthorizationDesc); //binding.add(new CheckBoxBinder(db, AuthorizationGroupIsApproveEEInfo)); //binding.add(new CheckBoxBinder(db, AuthorizationGroupIsApproveLeave)); //binding.add(new CheckBoxBinder(db, AuthorizationGroupIsReceiveOtherGrpAlert)); //binding.init(Request, Session); sbinding = new SearchBinding(dbConn, db); sbinding.add(new LikeSearchBinder(AuthorizationGroupCode, "AuthorizationCode")); sbinding.add(new LikeSearchBinder(AuthorizationGroupDesc, "AuthorizationDesc")); sbinding.init(DecryptedRequest, null); sbinding.initValues("AuthorizationGroupIsApproveEEInfo", null, Values.VLYesNo, HROne.Common.WebUtility.GetSessionUICultureInfo(Session)); sbinding.initValues("AuthorizationGroupIsApproveLeave", null, Values.VLYesNo, HROne.Common.WebUtility.GetSessionUICultureInfo(Session)); sbinding.initValues("AuthorizationGroupIsReceiveOtherGrpAlert", null, Values.VLYesNo, HROne.Common.WebUtility.GetSessionUICultureInfo(Session)); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
//private bool m_NeedSuperUser = false; protected void Page_Load(object sender, EventArgs e) { //Start 0000173, Miranda, 2015-06-03 this.Page.Form.DefaultButton = "mainContentPlaceHolder$Jump"; //End 0000173, Miranda, 2015-06-03 if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; Delete.Visible = false; TerminateButton.Visible = false; } if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } EmpID.Value = CurID.ToString(); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (Application["MasterDBConfig"] != null) { masterDBConn = ((DatabaseConfig)Application["MasterDBConfig"]).CreateDatabaseConnectionObject(); } else { Response.Redirect("~/AccessDeny.aspx"); } currentDateTime = AppUtils.ServerDateTime(); bankFileCutOffDateTime = currentDateTime.Date; while (HROne.SaaS.Entities.EPublicHoliday.IsHoliday(masterDBConn, bankFileCutOffDateTime) || bankFileCutOffDateTime.DayOfWeek == DayOfWeek.Sunday) { bankFileCutOffDateTime = bankFileCutOffDateTime.AddDays(1); } IsAllowEdit = WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite); string tmpDateTimeString = ESystemParameter.getParameter(masterDBConn, ESystemParameter.PARAM_CODE_BANKFILE_CUTOFF_TIME); TimeSpan bankFileCutOffTimeSpan; if (TimeSpan.TryParse(tmpDateTimeString, out bankFileCutOffTimeSpan)) { bankFileCutOffDateTime = bankFileCutOffDateTime.Add(bankFileCutOffTimeSpan); } HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); if (bankFileCutOffDateTime < currentDateTime) { UploadBankFilePanel.Visible = false; } else { UploadBankFilePanel.Visible = IsAllowEdit; } if (!IsPostBack) { if (DecryptedRequest["InboxID"] != null) { int inboxID = 0; if (int.TryParse(DecryptedRequest["InboxID"].ToString(), out inboxID)) { UploadFromInbox(inboxID); } } } }
protected void Page_Load(object sender, EventArgs e) { WebUtils.CheckAccess(Response, Session); if (WebUtils.CheckPermission(Session, "SYS010", WebUtils.AccessLevel.Read)) { HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "~/EmploymentType.aspx"); } HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_PreRender(object sender, EventArgs e) { EEmpPersonalInfo empInfo = new EEmpPersonalInfo(); empInfo.EmpID = CurID; EEmpPersonalInfo.db.select(dbConn, empInfo); if (!IsPostBack) { } if (CurID > 0) { } else { toolBar.EditButton_Visible = false; } DBFilter empTerminationFilter = new DBFilter(); empTerminationFilter.add(new Match("EmpID", CurID)); if (EEmpTermination.db.count(dbConn, empTerminationFilter) <= 0) { toolBar.CustomButton1_Visible = false; } else { toolBar.CustomButton1_Visible = toolBar.EditButton_Visible; } if (WebUtils.productLicense(Session).IsESS) { if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { toolBar.CustomButton2_Visible = false; } else { toolBar.CustomButton2_Visible = toolBar.EditButton_Visible; } } else { toolBar.CustomButton2_Visible = false; } if (empInfo.MasterEmpID > 0) { toolBar.CustomButton3_Visible = false; } else { toolBar.CustomButton3_Visible = toolBar.EditButton_Visible & IsAllowAddRow; } }
protected void Page_Load(object sender, EventArgs e) { productLicense = WebUtils.productLicense(Session); if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { Save.Visible = false; } }
private void RefreshSecurity() { if (!string.IsNullOrEmpty(m_FunctionCode)) { if (!WebUtils.CheckPermission(Session, m_FunctionCode, WebUtils.AccessLevel.ReadWrite)) { NewButton_Visible = false; EditButton_Visible = false; SaveButton_Visible = false; DeleteButton_Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } TaxGenEmpSelectAllPanel.Visible = true; sbinding = new SearchBinding(dbConn, db); sbinding.add(new DropDownVLSearchBinder(TaxCompID, "TaxCompID", ETaxCompany.VLTaxCompany).setLocale(HROne.Common.WebUtility.GetSessionUICultureInfo(Session))); sbinding.add(new DropDownVLSearchBinder(TaxFormType, "TaxFormType", ETaxForm.VLTaxFormType, false)); if (TaxFormType.SelectedValue.Equals("B", StringComparison.CurrentCultureIgnoreCase)) { sbinding.add(new DropDownVLSearchBinder(YearSelect, "TaxFormYear", new WFTaxYearList(AppUtils.ServerDateTime().Date.AddMonths(-2).Year), false)); } //sbinding.add(new DropDownVLSearchBinder(YearSelect, "", new WFYearList(AppUtils.ServerDateTime().Date.Year - 2001, 0))); else { sbinding.add(new DropDownVLSearchBinder(YearSelect, "TaxFormYear", new WFTaxYearList(AppUtils.ServerDateTime().Date.AddMonths(9).Year), false)); } //sbinding.add(new DropDownVLSearchBinder(YearSelect, "", new WFYearList(AppUtils.ServerDateTime().Date.Year - 2001, 1))); sbinding.init(DecryptedRequest, null); if (!string.IsNullOrEmpty(TaxCompID.SelectedValue)) { DBFilter taxFormFilter = sbinding.createFilter();// new DBFilter(); //taxFormFilter.add(new Match("TaxCompID", int.Parse(TaxCompID.SelectedValue))); //taxFormFilter.add(new Match("TaxFormYear", int.Parse(YearSelect.SelectedValue))); //taxFormFilter.add(new Match("TaxFormType", TaxFormType.SelectedValue)); ArrayList taxForms = ETaxForm.db.select(dbConn, taxFormFilter); if (taxForms.Count > 0) { CurID = ((ETaxForm)taxForms[0]).TaxFormID; } } info = ListFooter.ListInfo; TaxGeneratedInfo = TaxGenerated_ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_PAYSCALE_POINT_SYSTEM) != "Y") { HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "~/AccessDeny.aspx"); return; } toolBar.FunctionCode = FUNCTION_CODE; if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; } AddPanel.Visible = IsAllowEdit; ImportPanel.Visible = IsAllowEdit; //binding = new Binding(dbConn, db); //binding.add(new TextBoxBinder(db, StatutoryHolidayDate.TextBox, StatutoryHolidayDate.ID)); //binding.add(StatutoryHolidayDesc); //binding.init(Request, Session); binding = new Binding(dbConn, db); binding.add(new TextBoxBinder(db, EffectiveDate.TextBox, EffectiveDate.ID)); binding.add(new TextBoxBinder(db, ExpiryDate.TextBox, ExpiryDate.ID)); //binding.add(new TextBoxBinder(db, EffectiveDate.TextBox, EffectiveDate.ID)); //binding.add(new TextBoxBinder(db, ExpiryDate.TextBox, ExpiryDate.ID)); binding.add(SchemeCode); binding.add(Point); binding.add(Salary); binding.init(Request, Session); sbinding = new SearchBinding(dbConn, db); sbinding.add(new DropDownVLSearchBinder(SchemeSelect, "SchemeCode", EPayScaleMap.VLDistinctSchemeList, true)); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void Page_Load(object sender, EventArgs e) { if (Application["MasterDBConfig"] != null) { masterDBConn = ((DatabaseConfig)Application["MasterDBConfig"]).CreateDatabaseConnectionObject(); } else { Response.Redirect("~/AccessDeny.aspx"); } IsAllowEdit = WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite); if (Session["CompanyDBID"] != null) { CurID = (int)Session["CompanyDBID"]; } CompanyDBID.Value = CurID.ToString(); sbinding = new SearchBinding(masterDBConn, sdb); sbinding.initValues("HSBCExchangeProfileID", null, EHSBCExchangeProfile.VLRemoteProfileList, ci); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; string tmpDateTimeString = ESystemParameter.getParameter(masterDBConn, ESystemParameter.PARAM_CODE_BANKFILE_LAST_CANCEL_TIME); if (!DateTime.TryParseExact(tmpDateTimeString, "HH:mm", null, System.Globalization.DateTimeStyles.None, out bankFileLastCancelTime)) { bankFileLastCancelTime = new DateTime(); } currentUser = WebUtils.GetCurUser(Session); if (currentUser != null) { DBFilter signatureFilter = new DBFilter(); signatureFilter.add(new Match("UserID", currentUser.UserID)); if (HROne.Lib.Entities.EeChannelAuthorizedSignature.db.count(dbConn, signatureFilter) > 0) { isAuthorizer = true; } } }
// //private bool IsAllowEdit = true; protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { Attendance_AttendanceRecordList.IsAllowEdit = false; } else { Attendance_AttendanceRecordList.IsAllowEdit = true; } binding = new Binding(dbConn, db); binding.add(EmpID); binding.init(Request, Session); if (!int.TryParse(DecryptedRequest["EmpID"], out CurID)) { CurID = -1; } Attendance_AttendanceRecordList.CurrentEmpID = CurID; if (CurID <= 0) { //IsAllowEdit = false; Attendance_AttendanceRecordList.Visible = false; } loadState(); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); if (!Page.IsPostBack) { if (CurID > 0) { if (loadObject()) { } } } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, "PAY004", WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, "PAY004", WebUtils.AccessLevel.ReadWrite)) { ExistingEmployeeSelectAllPanel.Visible = false; NewJoinSelectAllPanel.Visible = false; FinalPaymentSelectAllPanel.Visible = false; btnProcess.Visible = false; chkSkipMPFCal.Visible = false; IsAllowEdit = false; } binding = new Binding(dbConn, db); binding.add(PayGroupID); binding.add(PayPeriodID); existingEmployeeSearchBinding = new SearchBinding(dbConn, EEmpPersonalInfo.db); newJoinSearchBinding = new SearchBinding(dbConn, EEmpPersonalInfo.db); finalPaymentSearchBinding = new SearchBinding(dbConn, EEmpPersonalInfo.db); binding.init(Request, Session); existingEmployeeInfo = existingEmployeeListFooter.ListInfo; newJoinInfo = newJoinListFooter.ListInfo; finalPaymentInfo = finalPayment.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(Page, Page.Controls); if (!int.TryParse(DecryptedRequest["PayPeriodID"], out CurID)) { CurID = -1; } if (CurID > 0) { loadObject(); } }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } if (!WebUtils.CheckPermission(Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite)) { IsAllowEdit = false; ConfirmPayrollSelectAllPanel.Visible = false; } sbinding = new SearchBinding(dbConn, db); sbinding.init(DecryptedRequest, null); info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }