public IList <HREmployeeBankAccountInformationEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <HREmployeeBankAccountInformationEntity> hREmployeeBankAccountInformationEntityList = new List <HREmployeeBankAccountInformationEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = HREmployeeBankAccountInformationEntity.FLD_NAME_EmployeeBankAccountInformationID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; hREmployeeBankAccountInformationEntityList = FCCHREmployeeBankAccountInformation.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (hREmployeeBankAccountInformationEntityList != null && hREmployeeBankAccountInformationEntityList.Count > 0) { totalRowCount = hREmployeeBankAccountInformationEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeBankAccountInformationEntityList ?? new List <HREmployeeBankAccountInformationEntity>()); }
private void SaveHREmployeeBankAccountInformationEntity() { if (IsValid) { try { HREmployeeBankAccountInformationEntity hREmployeeBankAccountInformationEntity = BuildHREmployeeBankAccountInformationEntity(); Int64 result = -1; if (hREmployeeBankAccountInformationEntity.IsNew) { result = FCCHREmployeeBankAccountInformation.GetFacadeCreate().Add(hREmployeeBankAccountInformationEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeBankAccountInformationEntity.FLD_NAME_EmployeeBankAccountInformationID, hREmployeeBankAccountInformationEntity.EmployeeBankAccountInformationID.ToString(), SQLMatchType.Equal); result = FCCHREmployeeBankAccountInformation.GetFacadeCreate().Update(hREmployeeBankAccountInformationEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _EmployeeBankAccountInformationID = 0; _HREmployeeBankAccountInformationEntity = new HREmployeeBankAccountInformationEntity(); PrepareInitialView(); BindHREmployeeBankAccountInformationList(); if (hREmployeeBankAccountInformationEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Employee Bank Account Information Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Employee Bank Account Information Information has been updated successfully.", false); } } else { if (hREmployeeBankAccountInformationEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Employee Bank Account Information Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Employee Bank Account Information Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
protected void lvHREmployeeBankAccountInformation_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 EmployeeBankAccountInformationID; Int64.TryParse(e.CommandArgument.ToString(), out EmployeeBankAccountInformationID); if (EmployeeBankAccountInformationID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _EmployeeBankAccountInformationID = EmployeeBankAccountInformationID; PrepareEditView(); cpeEditor.Collapsed = false; cpeEditor.ClientState = "false"; } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeBankAccountInformationEntity.FLD_NAME_EmployeeBankAccountInformationID, EmployeeBankAccountInformationID.ToString(), SQLMatchType.Equal); HREmployeeBankAccountInformationEntity hREmployeeBankAccountInformationEntity = new HREmployeeBankAccountInformationEntity(); result = FCCHREmployeeBankAccountInformation.GetFacadeCreate().Delete(hREmployeeBankAccountInformationEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _EmployeeBankAccountInformationID = 0; _HREmployeeBankAccountInformationEntity = new HREmployeeBankAccountInformationEntity(); PrepareInitialView(); BindHREmployeeBankAccountInformationList(); MiscUtil.ShowMessage(lblMessage, "Employee Bank Account Information has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete Employee Bank Account Information.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }
public IList <HREmployeeBankAccountInformationEntity> GetData() { IList <HREmployeeBankAccountInformationEntity> hREmployeeBankAccountInformationEntityList = new List <HREmployeeBankAccountInformationEntity>(); try { hREmployeeBankAccountInformationEntityList = FCCHREmployeeBankAccountInformation.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (hREmployeeBankAccountInformationEntityList != null && hREmployeeBankAccountInformationEntityList.Count > 0) { totalRowCount = hREmployeeBankAccountInformationEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeBankAccountInformationEntityList ?? new List <HREmployeeBankAccountInformationEntity>()); }