public static List <EmployeeMaster> getUserFunctionReports(string funccode) { List <EmployeeMaster> functionReports = new List <EmployeeMaster>(); FunctionReportAccess access = new FunctionReportAccess(); DataTable dtResult = access.GetUsersFunctionReports(funccode); foreach (DataRow dtr in dtResult.Rows) { EmployeeMaster item = new EmployeeMaster { SYS_EMPID = dtr["SYS_EMPID"].ToString(), EMPID = dtr["EMPID"].ToString(), EMPNAME = dtr["EMPNAME"].ToString(), POSITION = dtr["POSITION"].ToString(), SKILL = dtr["SKILL"].ToString() }; CategoryValueEntity position = bEmployeeMaster.getPositions().Where(p => p.Code == item.POSITION).FirstOrDefault(); CategoryValueEntity skill = bEmployeeMaster.getSkills().Where(p => p.Code == item.SKILL).FirstOrDefault(); if (position != null) { item.POSITION = position.CategoryValue; } if (skill != null) { item.SKILL = skill.CategoryValue; } functionReports.Add(item); } return(functionReports); }
public static List <CategoryValueEntity> getAcademicLevels() { List <CategoryValueEntity> categoryValues = new List <CategoryValueEntity>(); EmployeeMasterAccess access = new EmployeeMasterAccess(); DataTable dtResult = access.getAcademicLevels(); foreach (DataRow dtr in dtResult.Rows) { CategoryValueEntity item = new CategoryValueEntity { CategoryId = int.Parse(dtr["CATEGORY_ID"].ToString()), CategoryValueId = int.Parse(dtr["CAT_VALUE_ID"].ToString()), Code = dtr["CAT_CODE"].ToString(), CategoryValue = dtr["CAT_VALUE"].ToString() }; categoryValues.Add(item); } return(categoryValues); }
public DataTable SaveCategoryValue(string workingTag, string loginId, CategoryValueEntity entity) { OracleParameter[] parameters = new OracleParameter[13]; parameters[0] = new OracleParameter("WorkingTag", workingTag); parameters[1] = new OracleParameter("catcode", entity.Code); parameters[2] = new OracleParameter("CategoryValueId", entity.CategoryValueId); parameters[3] = new OracleParameter("CategoryValue", OracleDbType.NVarchar2) { Direction = ParameterDirection.Input, Value = entity.CategoryValue }; parameters[4] = new OracleParameter("CategoryId", entity.CategoryId); parameters[5] = new OracleParameter("DictionaryId", entity.DictionaryId); parameters[6] = new OracleParameter("IsActive", entity.IsActive); parameters[7] = new OracleParameter("ParentId", entity.ParentId); parameters[8] = new OracleParameter("pOrderIndex", entity.OrderIndex); parameters[9] = new OracleParameter("pIsEdit", entity.IsEdit); parameters[10] = new OracleParameter("pSubCode", entity.SubCode); parameters[11] = new OracleParameter("LoginId", loginId); parameters[12] = new OracleParameter("T_TABLE", OracleDbType.RefCursor) { Direction = ParameterDirection.Output }; return(DBHelper.getDataTable_SP("PKOPM_CATEGORY.sp_CategoryValue_Save", parameters)); }