public IList <HREmployeeJobDescriptionEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <HREmployeeJobDescriptionEntity> hREmployeeJobDescriptionEntityList = new List <HREmployeeJobDescriptionEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = HREmployeeJobDescriptionEntity.FLD_NAME_EmployeeJobDescriptionID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; hREmployeeJobDescriptionEntityList = FCCHREmployeeJobDescription.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (hREmployeeJobDescriptionEntityList != null && hREmployeeJobDescriptionEntityList.Count > 0) { totalRowCount = hREmployeeJobDescriptionEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeJobDescriptionEntityList ?? new List <HREmployeeJobDescriptionEntity>()); }
private void SaveHREmployeeJobDescriptionEntity() { if (IsValid) { try { HREmployeeJobDescriptionEntity hREmployeeJobDescriptionEntity = BuildHREmployeeJobDescriptionEntity(); Int64 result = -1; if (hREmployeeJobDescriptionEntity.IsNew) { result = FCCHREmployeeJobDescription.GetFacadeCreate().Add(hREmployeeJobDescriptionEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeJobDescriptionEntity.FLD_NAME_EmployeeJobDescriptionID, hREmployeeJobDescriptionEntity.EmployeeJobDescriptionID.ToString(), SQLMatchType.Equal); result = FCCHREmployeeJobDescription.GetFacadeCreate().Update(hREmployeeJobDescriptionEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _EmployeeJobDescriptionID = result; _HREmployeeJobDescriptionEntity = CurrentHREmployeeJobDescriptionEntity; PrepareEditView(); BindHREmployeeJobDescriptionList(); if (hREmployeeJobDescriptionEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Employee Job Description Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Employee Job Description Information has been updated successfully.", false); } } else { if (hREmployeeJobDescriptionEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Employee Job Description Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Employee Job Description Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
public IList <HREmployeeJobDescriptionEntity> GetData() { IList <HREmployeeJobDescriptionEntity> hREmployeeJobDescriptionEntityList = new List <HREmployeeJobDescriptionEntity>(); try { hREmployeeJobDescriptionEntityList = FCCHREmployeeJobDescription.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (hREmployeeJobDescriptionEntityList != null && hREmployeeJobDescriptionEntityList.Count > 0) { totalRowCount = hREmployeeJobDescriptionEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeJobDescriptionEntityList ?? new List <HREmployeeJobDescriptionEntity>()); }