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