/// <summary> /// 查询借用的资产数据,资产选择时用到 /// </summary> /// <param name="LocationID">区域编号</param> /// <param name="Name">名称</param> /// <param name="UserID">用户编号</param> /// <returns></returns> public DataTable GetBorrowedAss(string LocationID, string Name, string UserID) { int status = (int)STATUS.借用中; var result = _AssetsRepository.GetAssByStatus(LocationID, Name, UserID, status); var dtos = Mapper.Map <List <Assets>, List <AssSelectOutputDto> > (result.ToList()); foreach (var dto in dtos) { dto.IsChecked = false; } return(LINQToDataTable.ToDataTable(dtos)); }
/// <summary> /// 查询借用的资产数据,资产选择时用到 /// </summary> /// <param name="LocationID">区域编号</param> /// <param name="Name">名称</param> /// <param name="UserID">用户编号</param> /// <returns></returns> public DataTable GetBorrowedAss() { int status = 3; var result = _AssetsRepository.GetAssByStatus(status); var dtos = Mapper.Map <List <cmdb_asset>, List <AssSelectOutputDto> >(result.ToList()); //foreach (var dto in dtos) //{ // dto.IsChecked = false; //} return(LINQToDataTable.ToDataTable(dtos)); }