protected void btnPrint_Click(object sender, EventArgs e) { HROne.DataAccess.PageErrors errors = HROne.DataAccess.PageErrors.getErrors(null, Page.Master); errors.clear(); ArrayList list = new ArrayList(); foreach (RepeaterItem i in Repeater.Items) { CheckBox cb = (CheckBox)i.FindControl("ItemSelect"); if (cb.Checked) { ETaxEmp o = (ETaxEmp)ETaxEmp.db.createObject(); WebFormUtils.GetKeys(db, o, cb); list.Add(o); } } DateTime processDateTime = AppUtils.ServerDateTime(); if (list.Count > 0) { ESystemParameter.setParameter(dbConn, TAXATION_NAME_OF_SIGNATURE, txtNameOfSignature.Text); HROne.Reports.Taxation.TaxationFormProcess.ReportLanguage lang = HROne.Reports.Taxation.TaxationFormProcess.ReportLanguage.English; if (ReportLanguage.SelectedValue.Equals("big5")) { lang = HROne.Reports.Taxation.TaxationFormProcess.ReportLanguage.TraditionalChinese; } HROne.Reports.Taxation.TaxationFormProcess rpt = new HROne.Reports.Taxation.TaxationFormProcess(dbConn, list, CurrentTaxFormID, CurTaxFormType, txtNameOfSignature.Text, lang); string reportFileName = WebUtils.GetLocalizedReportFile(Server.MapPath("~/Report_Taxation_IR56" + CurTaxFormType + ".rpt")); WebUtils.ReportExport(dbConn, user, errors, lblReportHeader.Text + " ( " + TaxFormID.SelectedItem.Text + " IR56" + CurTaxFormType + " )", Response, rpt, reportFileName, string.Empty, "IR56" + CurTaxFormType, false); //string strTaxEmpIDList = string.Empty; //foreach (ETaxEmp o in list) //{ // if (strTaxEmpIDList == string.Empty) // strTaxEmpIDList = ((ETaxEmp)o).TaxEmpID.ToString(); // else // strTaxEmpIDList += "_" + ((ETaxEmp)o).TaxEmpID.ToString(); //} //Server.Transfer("Report_Taxation_Report_View.aspx?" // + "TaxFormID=" + CurrentTaxFormID // + "&TaxFormType=" + CurTaxFormType // + "&TaxEmpID=" + strTaxEmpIDList); } }
protected void RefreshClientSite(int RosterClientID) { string selected = RosterClientSiteID.SelectedValue; if (string.IsNullOrEmpty(selected)) { selected = null; } DBFilter rosterClientSiteFilter = new DBFilter(); rosterClientSiteFilter.add(new Match("RosterClientID", RosterClientID)); WebFormUtils.loadValues(dbConn, RosterClientSiteID, ERosterClientSite.VLRosterClientSite, rosterClientSiteFilter, null, (string)selected, (string)"combobox.notselected"); }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(db, row, cb); cb.Visible = IsAllowEdit; HtmlInputHidden h = (HtmlInputHidden)e.Item.FindControl("TaxEmpID"); h.Value = ((DataRowView)e.Item.DataItem)["TaxEmpID"].ToString(); e.Item.FindControl("ItemSelect").Visible = false; }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(sdb, row, cb); ECompanyMPFFile obj = new ECompanyMPFFile(); sdb.toObject(row.Row, obj); cb.Visible = false; }
protected void HierarchyLevel_ItemDataBound(object sender, RepeaterItemEventArgs e) { EHierarchyLevel level = (EHierarchyLevel)e.Item.DataItem; DBFilter filter = new DBFilter(); filter.add(new Match("HLevelID", level.HLevelID)); DropDownList c = (DropDownList)e.Item.FindControl("HElementID"); string selected = c.SelectedValue; WebFormUtils.loadValues(dbConn, c, EHierarchyElement.VLHierarchyElement, filter, ci, selected, "combobox.notselected"); c.Attributes["HLevelID"] = level.HLevelID.ToString(); }
protected void Ranks_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(ERank.db, row, cb); if (CurRanks.ContainsKey(row["RankID"])) { cb.Checked = true; } }
protected void Authorize_Click(object sender, EventArgs e) { PageErrors errors = PageErrors.getErrors(db, Page.Master); errors.clear(); ArrayList list = new ArrayList(); foreach (RepeaterItem i in Repeater.Items) { CheckBox cb = (CheckBox)i.FindControl("ItemSelect"); if (cb.Checked) { DBObject o = db.createObject(); WebFormUtils.GetKeys(db, o, cb); list.Add(o); } } foreach (EEmpRequest o in list) { db.select(dbConn, o); // Start 0000063, KuangWei, 2014-08-25 o.EmpRequestRejectReason = RejectReason.Text; // End 0000063, KuangWei, 2014-08-25 try { ESSAuthorizationProcess authorization = new ESSAuthorizationProcess(dbConn); ERequestOTClaim empOTRequest = new ERequestOTClaim(); empOTRequest.RequestOTClaimID = o.EmpRequestRecordID; if (ERequestOTClaim.db.select(dbConn, empOTRequest)) { // handle the case where CL Requisition requests are approved through Application Approval screen if (empOTRequest.RequestOTClaimEffectiveDate.Ticks.Equals(0)) { empOTRequest.RequestOTClaimEffectiveDate = AppUtils.ServerDateTime(); empOTRequest.RequestOTClaimDateExpiry = calExpiryDate(empOTRequest.RequestOTClaimPeriodFrom); ERequestOTClaim.db.update(dbConn, empOTRequest); } } authorization.AuthorizeAction(o, CurID); } catch (Exception ex) { errors.addError(ex.Message); } } view = loadData(info, db, Repeater); }
protected void companyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); Label CompanyIDLabel = (Label)e.Item.FindControl("CompanyID"); WebFormUtils.LoadKeys(ECompany.db, row, cb); ECompany company = new ECompany(); ECompany.db.toObject(row.Row, company); CompanyIDLabel.Text = string.Format("{0} - {1}", new string[] { company.CompanyCode, company.CompanyName }); } }
protected void Page_Load(object sender, EventArgs e) { binding = new Binding(dbConn, db); string charSelected = CharCriteriaD.SelectedValue; string sizeSelected = SizeCriteriaD.SelectedValue; WebFormUtils.loadValues(dbConn, CharCriteriaD, CharCriteriaMethod, new DBFilter(), ci, (string)charSelected, null); WebFormUtils.loadValues(dbConn, SizeCriteriaD, SizeCriteriaMethod, new DBFilter(), ci, (string)sizeSelected, null); //binding.add(new DropDownVLBinder(db, ModuleName, EReportBuilderField.VLModuleCode)); init_ModuleNameDropdown(); init_FavriouteTemplates(); binding.init(Request, Session); HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void btnGenerate_Click(object sender, EventArgs e) { PageErrors errors = PageErrors.getErrors(db, Page.Master); errors.clear(); DateTime dtLeaveAppDateFr = new DateTime(); DateTime dtLeaveAppDateTo = new DateTime(); if (!DateTime.TryParse(LeaveAppDateFr.Value, out dtLeaveAppDateFr)) { if (!string.IsNullOrEmpty(LeaveAppDateFr.Value)) { return; } } if (!DateTime.TryParse(LeaveAppDateTo.Value, out dtLeaveAppDateTo)) { if (!string.IsNullOrEmpty(LeaveAppDateTo.Value)) { return; } } EEmpPersonalInfo p = new EEmpPersonalInfo(); ArrayList values = new ArrayList(); foreach (RepeaterItem item in Repeater.Items) { CheckBox cb = (CheckBox)item.FindControl("ItemSelect"); if (cb.Checked) { WebFormUtils.GetKeys(db, p, cb); values.Add(p.EmpID); } } if (values.Count <= 0) { errors.addError("Employee not selected"); } if (errors.isEmpty()) { HROne.Reports.Employee.LeaveApplicationProcess rpt = new HROne.Reports.Employee.LeaveApplicationProcess(dbConn, values, dtLeaveAppDateFr, dtLeaveAppDateTo); string reportFileName = WebUtils.GetLocalizedReportFile(Server.MapPath("~/Report_Employee_LeaveApplicationList.rpt")); WebUtils.ReportExport(dbConn, user, errors, lblReportHeader.Text, Response, rpt, reportFileName, ((Button)sender).CommandArgument, "LeaveApplicationList", true); } //Session["Report_EmployeeList"] = values; //HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "Report_EmployeeDetail_View.aspx"); }
protected void companyBankAccountRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); Label CompanyBankAccountIDLabel = (Label)e.Item.FindControl("CompanyBankAccountID"); WebFormUtils.LoadKeys(ECompanyBankAccount.db, row, cb); ECompanyBankAccount companyBankAccount = new ECompanyBankAccount(); ECompanyBankAccount.db.toObject(row.Row, companyBankAccount); CompanyBankAccountIDLabel.Text = string.Format("{0}-{1}-{2} ({3})", new string[] { companyBankAccount.CompanyBankAccountBankCode, companyBankAccount.CompanyBankAccountBranchCode, companyBankAccount.CompanyBankAccountAccountNo, companyBankAccount.CompanyBankAccountHolderName }); } }
protected void Repeater_ItemCommand(object sender, RepeaterCommandEventArgs e) { PageErrors errors = PageErrors.getErrors(db, Page.Master); EDatabaseServer dbServer = new EDatabaseServer(); CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.GetKeys(db, dbServer, cb); if (EDatabaseServer.db.select(dbConn, dbServer)) { if (e.CommandArgument.Equals("TestSA")) { System.Data.SqlClient.SqlConnectionStringBuilder saConnStringBuilder = new System.Data.SqlClient.SqlConnectionStringBuilder(); saConnStringBuilder.DataSource = dbServer.DBServerLocation; saConnStringBuilder.UserID = dbServer.DBServerSAUserID; saConnStringBuilder.Password = dbServer.DBServerSAPassword; DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.DBType = WebUtils.DBTypeEmun.MSSQL; dbConfig.ConnectionString = saConnStringBuilder.ConnectionString; if (dbConfig.TestServerConnectionWithoutDatabase()) { errors.addError("Connection Pass"); } else { errors.addError("Connection Fail"); } } else if (e.CommandArgument.Equals("TestUser")) { System.Data.SqlClient.SqlConnectionStringBuilder saConnStringBuilder = new System.Data.SqlClient.SqlConnectionStringBuilder(); saConnStringBuilder.DataSource = dbServer.DBServerLocation; saConnStringBuilder.UserID = dbServer.DBServerUserID; saConnStringBuilder.Password = dbServer.DBServerPassword; DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.DBType = WebUtils.DBTypeEmun.MSSQL; dbConfig.ConnectionString = saConnStringBuilder.ConnectionString; if (dbConfig.TestServerConnectionWithoutDatabase()) { errors.addError("Connection Pass"); } else { errors.addError("Connection Fail"); } } } }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(sdb, row, cb); //ECompensationLeaveEntitle obj = new ECompensationLeaveEntitle(); //sdb.toObject(row.Row, obj); //if (obj.EmpPaymentID != 0) // cb.Visible = false; //else // cb.Visible = IsAllowEdit; }
protected void btnAdd_Click(object sender, EventArgs e) { WebUtils.StartFunction(Session, FUNCTION_CODE); foreach (RepeaterItem item in Repeater.Items) { CheckBox cb = (CheckBox)item.FindControl("ItemSelect"); CheckBox AuthorizerIsReadOnly = (CheckBox)item.FindControl("AuthorizerIsReadOnly"); CheckBox AuthorizerSkipEmailAlert = (CheckBox)item.FindControl("AuthorizerSkipEmailAlert"); if (cb.Checked) { EEmpPersonalInfo o = new EEmpPersonalInfo(); WebFormUtils.GetKeys(EEmpPersonalInfo.db, o, cb); DBFilter empAuthorizerFilter = new DBFilter(); empAuthorizerFilter.add(new Match("empid", o.EmpID)); empAuthorizerFilter.add(new Match("AuthorizationGroupID", CurID)); if (EAuthorizer.db.count(dbConn, empAuthorizerFilter) <= 0) { EAuthorizer authorizer = new EAuthorizer(); authorizer.EmpID = o.EmpID; authorizer.AuthorizationGroupID = CurID; authorizer.AuthorizerIsReadOnly = AuthorizerIsReadOnly.Checked; authorizer.AuthorizerSkipEmailAlert = AuthorizerSkipEmailAlert.Checked; EAuthorizer.db.insert(dbConn, authorizer); } } } WebUtils.EndFunction(dbConn); ArrayList list = WebUtils.SelectedRepeaterItemToBaseObjectList(EEmpPersonalInfo.db, Repeater, "ItemSelect"); foreach (EEmpPersonalInfo o in list) { DBFilter empAuthorizerFilter = new DBFilter(); empAuthorizerFilter.add(new Match("empid", o.EmpID)); empAuthorizerFilter.add(new Match("AuthorizationGroupID", CurID)); if (EAuthorizer.db.count(dbConn, empAuthorizerFilter) <= 0) { WebUtils.StartFunction(Session, FUNCTION_CODE, o.EmpID); EAuthorizer authorizer = new EAuthorizer(); authorizer.EmpID = o.EmpID; authorizer.AuthorizationGroupID = CurID; EAuthorizer.db.insert(dbConn, authorizer); WebUtils.EndFunction(dbConn); } } HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "ESS_AuthorizationGroup_View.aspx?AuthorizationGroupID=" + CurID); }
protected void btnGenerate_Click(object sender, EventArgs e) { PageErrors errors = PageErrors.getErrors(db, Page.Master); errors.clear(); ArrayList empTermList = new ArrayList(); foreach (RepeaterItem item in Repeater.Items) { CheckBox cb = (CheckBox)item.FindControl("ItemSelect"); if (cb.Checked) { EEmpTermination et = new EEmpTermination(); WebFormUtils.GetKeys(EEmpTermination.db, et, cb); empTermList.Add(et); } } string strTermEmpList = string.Empty; if (empTermList.Count > 0) { //foreach (EEmpTermination o in empTermList) //{ // if (strTermEmpList == string.Empty) // strTermEmpList = o.EmpTermID.ToString(); // else // strTermEmpList += "_" + o.EmpTermID.ToString(); //} } else { errors.addError("Employee not selected"); } if (errors.isEmpty()) { HROne.Reports.Employee.TerminationListProcess rpt = new HROne.Reports.Employee.TerminationListProcess(dbConn, empTermList); string reportFileName = WebUtils.GetLocalizedReportFile(Server.MapPath("~/Report_Employee_TerminationList.rpt")); WebUtils.ReportExport(dbConn, user, errors, lblReportHeader.Text, Response, rpt, reportFileName, ((Button)sender).CommandArgument, "TerminationList", true); //Server.Transfer("Report_Employee_TerminationList_View.aspx?" //+ "EmpTermID=" + strTermEmpList //); } // emploadData(empInfo, EEmpPayroll.db, empRepeater); }
public static ArrayList SelectedRepeaterItemToBaseObjectList(DBManager db, Repeater RepeaterControl, string CheckBoxName) { ArrayList list = new ArrayList(); foreach (RepeaterItem i in RepeaterControl.Items) { CheckBox cb = (CheckBox)i.FindControl(CheckBoxName); if (cb.Checked) { DBObject o = (DBObject)db.createObject(); WebFormUtils.GetKeys(db, o, cb); list.Add(o); } } return(list); }
protected void payBatchRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { HROne.Common.WebUtility.WebControlsLocalization(Session, e.Item.Controls); DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); if (PayrollBatchCheckBoxDefaultCheckedOption == PayrollBatchCheckBoxDefaultCheckedOptionEnum.All) { cb.Checked = true; } else { cb.Checked = false; } if (PayrollStatus.SelectedValue.Equals("C")) { EPayrollBatch obj = new EPayrollBatch(); EPayrollBatch.db.toObject(row.Row, obj); if (EPayrollBatch.db.select(dbConn, obj)) { Hashtable values = new Hashtable(); EPayrollBatch.db.populate(obj, values); WebFormUtils.LoadKeys(EPayrollBatch.db, row, cb); Binding ebinding = new Binding(dbConn, EPayrollBatch.db); ebinding.add(new BlankZeroLabelVLBinder(EPayrollBatch.db, (Label)e.Item.FindControl("PayBatchFileGenBy"), EUser.VLUserName)); ebinding.init(Request, Session); ebinding.toControl(values); if (PayrollBatchCheckBoxDefaultCheckedOption == PayrollBatchCheckBoxDefaultCheckedOptionEnum.ReleasePaySlipToESS) { cb.Checked = obj.PayBatchIsESSPaySlipRelease; } else if (row.Row.IsNull("PayBatchFileGenDate") && PayrollBatchCheckBoxDefaultCheckedOption == PayrollBatchCheckBoxDefaultCheckedOptionEnum.ExcludeBankFileGenerated) { cb.Checked = true; } } } else if (PayrollStatus.SelectedValue.Equals("T")) { WebFormUtils.LoadKeys(EPayrollPeriod.db, row, cb); } //if (row["PayBatchFileGenDate"] != DBNull.Value) // cb.Checked = false; }
protected void btnUndo_Click(object sender, EventArgs e) { PageErrors errors = PageErrors.getErrors(EEmpPayroll.db, Page.Master); errors.clear(); ArrayList list = new ArrayList(); foreach (RepeaterItem i in Repeater.Items) { CheckBox cb = (CheckBox)i.FindControl("ItemSelect"); if (cb.Checked) { EEmpPayroll o = (EEmpPayroll)EEmpPayroll.db.createObject(); WebFormUtils.GetKeys(EEmpPayroll.db, o, cb); list.Add(o); } } if (list.Count > 0) { DateTime paidDate = new DateTime(); if (!string.IsNullOrEmpty(SetPaidDate.Value)) { paidDate = DateTime.Parse(SetPaidDate.Value); } foreach (EEmpPayroll o in list) { if (EEmpPayroll.db.select(dbConn, o)) { if (!o.EmpPayValueDate.Equals(paidDate)) { WebUtils.StartFunction(Session, FUNCTION_CODE, o.EmpID, true); o.EmpPayValueDate = paidDate; EEmpPayroll.db.update(dbConn, o); WebUtils.EndFunction(dbConn); } } } errors.addError("Paid Date is updated"); SetPaidDate.Value = string.Empty; } loadData(info, EEmpPayroll.db, Repeater); }
public void SaveAsReleaseESSPaySlip() { foreach (RepeaterItem i in payBatchRepeater.Items) { CheckBox cb = (CheckBox)i.FindControl("ItemSelect"); EPayrollBatch o = new EPayrollBatch(); WebFormUtils.GetKeys(EPayrollBatch.db, o, cb); if (EPayrollBatch.db.select(dbConn, o)) { if (o.PayBatchIsESSPaySlipRelease != cb.Checked) { o.PayBatchIsESSPaySlipRelease = cb.Checked; EPayrollBatch.db.update(dbConn, o); } } } }
protected void btnGenerate_Click(object sender, EventArgs e) { PageErrors errors = PageErrors.getErrors(db, Page.Master); errors.clear(); ArrayList empJoinList = new ArrayList(); foreach (RepeaterItem item in Repeater.Items) { CheckBox cb = (CheckBox)item.FindControl("ItemSelect"); if (cb.Checked) { EEmpPersonalInfo empJoin = new EEmpPersonalInfo(); WebFormUtils.GetKeys(EEmpPersonalInfo.db, empJoin, cb); empJoinList.Add(empJoin); } } if (empJoinList.Count < 1) { errors.addError("Employee not selected"); } if (errors.isEmpty()) { ESystemParameter.setParameter(dbConn, SYSTEMPARAMETER_PREPAREDBY, txtPreparedBy.Text); ESystemParameter.setParameter(dbConn, SYSTEMPARAMETER_REVIEWEDBY, txtReviewedBy.Text); HROne.Reports.Payroll.NewJoinPaymentSummaryProcess rpt = null; if (Payroll_PeriodSelectionList1.SelectedPayrollStatus.Equals("C")) { ArrayList payBatchList = this.Payroll_PeriodSelectionList1.GetPayBatchList(); rpt = new HROne.Reports.Payroll.NewJoinPaymentSummaryProcess(dbConn, empJoinList, null, payBatchList, HROne.Reports.Payroll.NewJoinPaymentSummaryProcess.ReportType.History, txtPreparedBy.Text, txtReviewedBy.Text); } else if (Payroll_PeriodSelectionList1.SelectedPayrollStatus.Equals("T")) { ArrayList payPeriodList = this.Payroll_PeriodSelectionList1.GetTrialRunPayPeriodList(); rpt = new HROne.Reports.Payroll.NewJoinPaymentSummaryProcess(dbConn, empJoinList, payPeriodList, null, HROne.Reports.Payroll.NewJoinPaymentSummaryProcess.ReportType.TrialRun, txtPreparedBy.Text, txtReviewedBy.Text); } string reportFileName = WebUtils.GetLocalizedReportFile(Server.MapPath("~/Report_Payroll_NewJoinPaymentSummary.rpt")); WebUtils.ReportExport(dbConn, user, errors, lblReportHeader.Text, Response, rpt, reportFileName, ((Button)sender).CommandArgument, "NewJoinPaymentSummary", true); } }
protected void HierarchyLevel_ItemDataBound(object sender, RepeaterItemEventArgs e) { EHierarchyLevel level = (EHierarchyLevel)e.Item.DataItem; DBFilter filter = new DBFilter(); filter.add(new Match("HLevelID", level.HLevelID)); filter.add(new Match("CompanyID", CompanyID.SelectedValue.Equals(string.Empty) ? "0" : CompanyID.SelectedValue)); DropDownList c = (DropDownList)e.Item.FindControl("HElementID"); EEmpHierarchy h = (EEmpHierarchy)CurElements[level.HLevelID]; string selected = null; if (h != null) { selected = h.HElementID.ToString(); } WebFormUtils.loadValues(dbConn, c, EHierarchyElement.VLHierarchyElement, filter, null, selected, "combobox.notselected"); c.Attributes["HLevelID"] = level.HLevelID.ToString(); }
protected void Delete_Click(object sender, EventArgs e) { PageErrors errors = PageErrors.getErrors(sdb, Page.Master); errors.clear(); ArrayList list = new ArrayList(); foreach (RepeaterItem i in Repeater.Items) { CheckBox cb = (CheckBox)i.FindControl("ItemSelect"); if (cb.Checked) { EEmpBankAccount o = new EEmpBankAccount(); WebFormUtils.GetKeys(sdb, o, cb); list.Add(o); } } foreach (EEmpBankAccount obj in list) { sdb.select(dbConn, obj); DBFilter paymentRecordFilter = new DBFilter(); paymentRecordFilter.add(new Match("EmpAccID", obj.EmpBankAccountID)); IN inTerms = new IN("EmpPayrollID", "Select EmpPayrollID From " + EPaymentRecord.db.dbclass.tableName, paymentRecordFilter); DBFilter empPayrollFilter = new DBFilter(); empPayrollFilter.add(inTerms); empPayrollFilter.add("empid", true); ArrayList empPayrollList = EEmpPayroll.db.select(dbConn, empPayrollFilter); if (empPayrollList.Count > 0) { errors.addError(string.Format(HROne.Translation.PageErrorMessage.ERROR_CODE_IS_IN_USE, new string[] { HROne.Common.WebUtility.GetLocalizedString("Bank Account") })); errors.addError(HROne.Translation.PageErrorMessage.ERROR_ACTION_ABORT); } else { WebUtils.StartFunction(Session, FUNCTION_CODE, obj.EmpID); sdb.delete(dbConn, obj); WebUtils.EndFunction(dbConn); } } loadData(info, sdb, Repeater); }
protected void Page_Load(object sender, EventArgs e) { if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read)) { return; } binding = new SearchBinding(dbConn, db); binding.init(DecryptedRequest, null); if (!IsPostBack) { WebFormUtils.loadValues(dbConn, EmpProbaUnit, Values.VLEmpUnit, null, null, string.Empty, "combobox.notselected"); } info = ListFooter.ListInfo; HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls); }
protected void SystemFunctionRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(ESystemFunction.db, row, cb); if (CurSystemFunction.ContainsKey((int)row["FunctionID"])) { cb.Checked = true; } EUser user = WebUtils.GetCurUser(Session); if (user.UserID == CurID) { cb.Enabled = false; } }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(db, row, cb); e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible; Binding ebinding; EBonusProcess obj = new EBonusProcess(); db.toObject(((DataRowView)e.Item.DataItem).Row, obj); if (obj.BonusProcessPayCodeID > 0) { //((HtmlAnchor)e.Item.FindControl("BonusProcessMonth")).InnerText = obj.BonusProcessMonth.ToString("yyyy-MM"); ((Label)e.Item.FindControl("BonusProcessPayDate")).Text = obj.BonusProcessPayDate.ToString("yyyy-MM-dd"); switch (obj.BonusProcessStatus) { case EBonusProcess.STATUS_CANCELLED: ((Label)e.Item.FindControl("BonusProcessStatus")).Text = EBonusProcess.STATUS_CANCELLED_DESC; break; case EBonusProcess.STATUS_NORMAL: ((Label)e.Item.FindControl("BonusProcessStatus")).Text = EBonusProcess.STATUS_NORMAL_DESC; break; case EBonusProcess.STATUS_CONFIRMED: ((Label)e.Item.FindControl("BonusProcessStatus")).Text = EBonusProcess.STATUS_CONFIRMED_DESC; break; } EPaymentCode m_payCode = EPaymentCode.GetObject(dbConn, obj.BonusProcessPayCodeID); if (m_payCode != null) { // ((Label)e.Item.FindControl("BonusProcessPayCode")).Text = m_payCode.PaymentCodeDesc; ((Label)e.Item.FindControl("BonusProcessPayCode")).Text = m_payCode.PaymentCodeDesc; } } }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(EPaymentCode.db, row, cb); EPaymentCode obj = new EPaymentCode(); EPaymentCode.db.toObject(row.Row, obj); if (!Page.IsPostBack) { DBFilter taxPaymentMapFilter = new DBFilter(); taxPaymentMapFilter.add(new Match("TaxPayID", CurID)); taxPaymentMapFilter.add(new Match("PaymentCodeID", row["PaymentCodeID"])); ArrayList taxPaymentMaps = ETaxPaymentMap.db.select(dbConn, taxPaymentMapFilter); if (taxPaymentMaps.Count != 0) { cb.Checked = true; } } else { foreach (BaseObject selectedObj in selectedItemList) { bool isSelected = true; foreach (DBField keyObj in EPaymentCode.db.keys) { if (!keyObj.getValue(selectedObj).Equals(keyObj.getValue(obj))) { isSelected = false; } } if (isSelected) { cb.Checked = true; break; } } } }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(db, row, cb); cb.Checked = true; Label paymentCodeLabel = (Label)e.Item.FindControl("empRPPaymentCode"); if (paymentCodeLabel != null) { if (row["PaymentCode"] != null && (string)row["PaymentCode"] != "") { DBFieldTranscoder transcoder = EPaymentCode.db.getField("PaymentCode").transcoder; paymentCodeLabel.Text = (string)transcoder.fromDB(row["PaymentCode"]);// (string)row["PaymentCode"]; } } }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(db, row, cb); ETaxEmp obj = new ETaxEmp(); db.toObject(((DataRowView)e.Item.DataItem).Row, obj); if (obj.TaxEmpIsReleasePrintoutToESS) { cb.Checked = true; } else { cb.Checked = false; } }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); HtmlAnchor requestLink = (HtmlAnchor)e.Item.FindControl("requestLink"); WebFormUtils.LoadKeys(sdb, row, cb); cb.Checked = false; cb.Visible = true; EAttendanceRecord obj = new EAttendanceRecord(); EAttendanceRecord.db.toObject(((DataRowView)e.Item.DataItem).Row, obj); // Start 0000112, Miranda, 2015-01-11 if (hasSubmitted(obj.AttendanceRecordID)) { cb.Visible = false; } // End 0000112, Miranda, 2015-01-11 }
protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { DataRowView row = (DataRowView)e.Item.DataItem; CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect"); WebFormUtils.LoadKeys(sdb, row, cb); ELeaveApplication obj = new ELeaveApplication(); sdb.toObject(row.Row, obj); if (obj.EmpPaymentID != 0 || obj.EmpPayrollID != 0) { cb.Visible = false; } else { cb.Visible = IsAllowEdit; } }