public IList <HREmployeeSalaryInfoHistoryEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <HREmployeeSalaryInfoHistoryEntity> hREmployeeSalaryInfoHistoryEntityList = new List <HREmployeeSalaryInfoHistoryEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = HREmployeeSalaryInfoHistoryEntity.FLD_NAME_EmployeeSalaryInfoHistoryID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; hREmployeeSalaryInfoHistoryEntityList = FCCHREmployeeSalaryInfoHistory.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (hREmployeeSalaryInfoHistoryEntityList != null && hREmployeeSalaryInfoHistoryEntityList.Count > 0) { totalRowCount = hREmployeeSalaryInfoHistoryEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeSalaryInfoHistoryEntityList ?? new List <HREmployeeSalaryInfoHistoryEntity>()); }
private void SaveHREmployeeSalaryInfoHistoryEntity() { if (IsValid) { try { HREmployeeSalaryInfoHistoryEntity hREmployeeSalaryInfoHistoryEntity = BuildHREmployeeSalaryInfoHistoryEntity(); Int64 result = -1; if (hREmployeeSalaryInfoHistoryEntity.IsNew) { result = FCCHREmployeeSalaryInfoHistory.GetFacadeCreate().Add(hREmployeeSalaryInfoHistoryEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeSalaryInfoHistoryEntity.FLD_NAME_EmployeeSalaryInfoHistoryID, hREmployeeSalaryInfoHistoryEntity.EmployeeSalaryInfoHistoryID.ToString(), SQLMatchType.Equal); result = FCCHREmployeeSalaryInfoHistory.GetFacadeCreate().Update(hREmployeeSalaryInfoHistoryEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _EmployeeSalaryInfoHistoryID = 0; _HREmployeeSalaryInfoHistoryEntity = new HREmployeeSalaryInfoHistoryEntity(); PrepareInitialView(); BindHREmployeeSalaryInfoHistoryList(); if (hREmployeeSalaryInfoHistoryEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Employee Salary Info History Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Employee Salary Info History Information has been updated successfully.", false); } } else { if (hREmployeeSalaryInfoHistoryEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Employee Salary Info History Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Employee Salary Info History Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
protected void lvHREmployeeSalaryInfoHistory_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 EmployeeSalaryInfoHistoryID; Int64.TryParse(e.CommandArgument.ToString(), out EmployeeSalaryInfoHistoryID); if (EmployeeSalaryInfoHistoryID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _EmployeeSalaryInfoHistoryID = EmployeeSalaryInfoHistoryID; PrepareEditView(); cpeEditor.Collapsed = false; cpeEditor.ClientState = "false"; } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeSalaryInfoHistoryEntity.FLD_NAME_EmployeeSalaryInfoHistoryID, EmployeeSalaryInfoHistoryID.ToString(), SQLMatchType.Equal); HREmployeeSalaryInfoHistoryEntity hREmployeeSalaryInfoHistoryEntity = new HREmployeeSalaryInfoHistoryEntity(); result = FCCHREmployeeSalaryInfoHistory.GetFacadeCreate().Delete(hREmployeeSalaryInfoHistoryEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _EmployeeSalaryInfoHistoryID = 0; _HREmployeeSalaryInfoHistoryEntity = new HREmployeeSalaryInfoHistoryEntity(); PrepareInitialView(); BindHREmployeeSalaryInfoHistoryList(); MiscUtil.ShowMessage(lblMessage, "Employee Salary Info History has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete Employee Salary Info History.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }
public IList <HREmployeeSalaryInfoHistoryEntity> GetData() { IList <HREmployeeSalaryInfoHistoryEntity> hREmployeeSalaryInfoHistoryEntityList = new List <HREmployeeSalaryInfoHistoryEntity>(); try { hREmployeeSalaryInfoHistoryEntityList = FCCHREmployeeSalaryInfoHistory.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (hREmployeeSalaryInfoHistoryEntityList != null && hREmployeeSalaryInfoHistoryEntityList.Count > 0) { totalRowCount = hREmployeeSalaryInfoHistoryEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeSalaryInfoHistoryEntityList ?? new List <HREmployeeSalaryInfoHistoryEntity>()); }