public int InsertEmployeeContractBookMark(EmployeeContractBookMark employeecontractBookMark) { int pkid; SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_PKID, SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add(_BookMarkName, SqlDbType.NVarChar, 50).Value = employeecontractBookMark.BookMarkName; cmd.Parameters.Add(_EmployeeContractID, SqlDbType.Int).Value = employeecontractBookMark.EmployeeContractID; cmd.Parameters.Add(_BookMarkValue, SqlDbType.Text).Value = employeecontractBookMark.BookMarkValue; SqlHelper.ExecuteNonQueryReturnPKID("EmployeeContractBookMarkInsert", cmd, out pkid); return(pkid); }
/// <summary> /// 为合同新增界面创建List<EmployeeContractBookMark> /// </summary> public List <EmployeeContractBookMark> GetEmployeeContractBookMarkByContractTypeID(int ContractTypeId, int employeeID) { List <ContractBookMark> contractBookMark = _dalContractBookMark.GetContractBookMarkByContractTypeID(ContractTypeId); Employee employee = new GetEmployee(_dalEmployee, _IAccountBll, _dalEmployeeSkill, _IDepartmentBll, _EmployeeAdjustRuleDal). GetEmployeeByAccountID(employeeID); if (contractBookMark != null && contractBookMark.Count > 0) { List <EmployeeContractBookMark> employeeContractBookMark = new List <EmployeeContractBookMark>(); foreach (ContractBookMark mark in contractBookMark) { employeeContractBookMark.Add(new EmployeeContractBookMark(0, 0, mark.BookMarkName, EmployeeContractBookMark.InitBookMarkValue(mark.BookMarkName, employee))); } return(employeeContractBookMark); } else { return(null); } }