public IList <HREmployeeConfidentialInfoEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <HREmployeeConfidentialInfoEntity> hREmployeeConfidentialInfoEntityList = new List <HREmployeeConfidentialInfoEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = HREmployeeConfidentialInfoEntity.FLD_NAME_EmployeeConfidentialInfoID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; hREmployeeConfidentialInfoEntityList = FCCHREmployeeConfidentialInfo.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (hREmployeeConfidentialInfoEntityList != null && hREmployeeConfidentialInfoEntityList.Count > 0) { totalRowCount = hREmployeeConfidentialInfoEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeConfidentialInfoEntityList ?? new List <HREmployeeConfidentialInfoEntity>()); }
private void SaveHREmployeeConfidentialInfoEntity() { if (IsValid) { try { HREmployeeConfidentialInfoEntity hREmployeeConfidentialInfoEntity = BuildHREmployeeConfidentialInfoEntity(); Int64 result = -1; if (hREmployeeConfidentialInfoEntity.IsNew) { result = FCCHREmployeeConfidentialInfo.GetFacadeCreate().Add(hREmployeeConfidentialInfoEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeConfidentialInfoEntity.FLD_NAME_EmployeeConfidentialInfoID, hREmployeeConfidentialInfoEntity.EmployeeConfidentialInfoID.ToString(), SQLMatchType.Equal); result = FCCHREmployeeConfidentialInfo.GetFacadeCreate().Update(hREmployeeConfidentialInfoEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _EmployeeConfidentialInfoID = result; _HREmployeeConfidentialInfoEntity = CurrentHREmployeeConfidentialInfoEntity; //PrepareInitialView(); BindHREmployeeConfidentialInfoList(); PrepareEditView(); if (hREmployeeConfidentialInfoEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Employee Confidential Info Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Employee Confidential Info Information has been updated successfully.", false); } } else { if (hREmployeeConfidentialInfoEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Employee Confidential Info Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Employee Confidential Info Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
public IList <HREmployeeConfidentialInfoEntity> GetData() { IList <HREmployeeConfidentialInfoEntity> hREmployeeConfidentialInfoEntityList = new List <HREmployeeConfidentialInfoEntity>(); try { hREmployeeConfidentialInfoEntityList = FCCHREmployeeConfidentialInfo.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (hREmployeeConfidentialInfoEntityList != null && hREmployeeConfidentialInfoEntityList.Count > 0) { totalRowCount = hREmployeeConfidentialInfoEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeConfidentialInfoEntityList ?? new List <HREmployeeConfidentialInfoEntity>()); }