/// <summary> /// 保存映射关系 /// </summary> /// <param name="standardMapItem">需要保存的映射关系</param> /// <returns>是否成功</returns> public bool SaveMapItem(StandardMapItem standardMapItem) { //throw new NotImplementedException(); IStandardMapItemDAL dAL = new StandardMapItemDAL(); StandardMapItem tempMap = dAL.GetStandardMapItemByStandardAndItem(standardMapItem.StandardId, standardMapItem.ItemId); if (tempMap != null) { standardMapItem.Id = tempMap.Id; if (dAL.Update(standardMapItem) > 0) { return(true); } else { return(false); } } else { if (dAL.Add(standardMapItem) > 0) { return(true); } else { return(false); } } }
/// <summary> /// 通过薪酬标准的id,获取所有的标准与项目的映射关系 /// </summary> /// <param name="standardId">薪酬标准的id</param> /// <returns>List类型,所有的标准与项目的映射关系</returns> public List <StandardMapItem> GetAllStandardMapItemByStandardId(int standardId) { //throw new NotImplementedException(); IStandardMapItemDAL dAL = new StandardMapItemDAL(); return(dAL.GetAllStandardMapItemByStandardId(standardId)); }
/// <summary> /// 获取所有薪酬标准和薪酬项目的映射关系 /// </summary> /// <returns>List类型,所有薪酬标准和薪酬项目的映射关系</returns> public List <StandardMapItem> GetAllStandardMapItem() { //throw new NotImplementedException(); IStandardMapItemDAL dAL = new StandardMapItemDAL(); return(dAL.Query()); }