public IList <HREmployeeSkillMapEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <HREmployeeSkillMapEntity> hREmployeeSkillMapEntityList = new List <HREmployeeSkillMapEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = HREmployeeSkillMapEntity.FLD_NAME_EmployeeSkillMapID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; hREmployeeSkillMapEntityList = FCCHREmployeeSkillMap.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (hREmployeeSkillMapEntityList != null && hREmployeeSkillMapEntityList.Count > 0) { totalRowCount = hREmployeeSkillMapEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeSkillMapEntityList ?? new List <HREmployeeSkillMapEntity>()); }
private void SaveHREmployeeSkillMapEntity() { if (IsValid) { try { HREmployeeSkillMapEntity hREmployeeSkillMapEntity = BuildHREmployeeSkillMapEntity(); Int64 result = -1; if (hREmployeeSkillMapEntity.IsNew) { result = FCCHREmployeeSkillMap.GetFacadeCreate().Add(hREmployeeSkillMapEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeSkillMapEntity.FLD_NAME_EmployeeSkillMapID, hREmployeeSkillMapEntity.EmployeeSkillMapID.ToString(), SQLMatchType.Equal); result = FCCHREmployeeSkillMap.GetFacadeCreate().Update(hREmployeeSkillMapEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _EmployeeSkillMapID = 0; _HREmployeeSkillMapEntity = new HREmployeeSkillMapEntity(); PrepareInitialView(); BindHREmployeeSkillMapList(); if (hREmployeeSkillMapEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Employee Skill Map Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Employee Skill Map Information has been updated successfully.", false); } } else { if (hREmployeeSkillMapEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Employee Skill Map Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Employee Skill Map Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
protected void lvHREmployeeSkillMap_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 EmployeeSkillMapID; Int64.TryParse(e.CommandArgument.ToString(), out EmployeeSkillMapID); if (EmployeeSkillMapID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _EmployeeSkillMapID = EmployeeSkillMapID; PrepareEditView(); cpeEditor.Collapsed = false; cpeEditor.ClientState = "false"; } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(HREmployeeSkillMapEntity.FLD_NAME_EmployeeSkillMapID, EmployeeSkillMapID.ToString(), SQLMatchType.Equal); HREmployeeSkillMapEntity hREmployeeSkillMapEntity = new HREmployeeSkillMapEntity(); result = FCCHREmployeeSkillMap.GetFacadeCreate().Delete(hREmployeeSkillMapEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _EmployeeSkillMapID = 0; _HREmployeeSkillMapEntity = new HREmployeeSkillMapEntity(); PrepareInitialView(); BindHREmployeeSkillMapList(); MiscUtil.ShowMessage(lblMessage, "Employee Skill Map has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete Employee Skill Map.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }
public IList <HREmployeeSkillMapEntity> GetData() { IList <HREmployeeSkillMapEntity> hREmployeeSkillMapEntityList = new List <HREmployeeSkillMapEntity>(); try { hREmployeeSkillMapEntityList = FCCHREmployeeSkillMap.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (hREmployeeSkillMapEntityList != null && hREmployeeSkillMapEntityList.Count > 0) { totalRowCount = hREmployeeSkillMapEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(hREmployeeSkillMapEntityList ?? new List <HREmployeeSkillMapEntity>()); }