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