Ejemplo n.º 1
0
        /// <summary>
        /// 查询借用的资产信息,通过扫码添加时用到
        /// </summary>
        /// <param name="LocationID">区域编号</param>
        /// <param name="SN">序列号</param>
        /// <param name="UserID">用户名称</param>
        /// <returns></returns>
        public DataTable GetBorrowedAssEx(string LocationID, string SN, string UserID)
        {
            int status = (int)STATUS.借用中;
            var result = _AssetsRepository.GetAssByStatusEx(LocationID, SN, UserID, status);
            var dtos   = Mapper.Map <List <Assets>, List <AssSelectOutputDto> >(result.ToList());

            foreach (var dto in dtos)
            {
                dto.IsChecked = false;
            }
            return(LINQToDataTable.ToDataTable(dtos));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 查询借用的资产信息,通过扫码添加时用到
        /// </summary>
        /// <param name="LocationID">区域编号</param>
        /// <param name="SN">序列号</param>
        /// <param name="UserID">用户名称</param>
        /// <returns></returns>
        public DataTable GetBorrowedAssEx(string LocationID, string SN, string UserID)
        {
            int status = (int)STATUS.借用中;
            var result = _AssetsRepository.GetAssByStatusEx(LocationID, SN, UserID, status);
            var ass    = from assetse in result
                         join user in SMOSECDbContext.coreUsers on assetse.CURRENTUSER equals user.USER_ID
                         select new AssSelectOutputDto()
            {
                IsChecked = false,
                IMAGE     = assetse.IMAGE,
                NAME      = assetse.IMAGE,
                ASSID     = assetse.ASSID,
                SN        = assetse.SN,
                USERNAME  = user.USER_NAME
            };

            return(LINQToDataTable.ToDataTable(ass));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 查询借用的资产信息,通过扫码添加时用到
        /// </summary>
        /// <param name="LocationID">区域编号</param>
        /// <param name="SN">序列号</param>
        /// <param name="UserID">用户名称</param>
        /// <returns></returns>
        public DataTable GetBorrowedAssEx(string SN)
        {
            int status = 3;
            var result = _AssetsRepository.GetAssByStatusEx(SN, status);

            //var ass = from assetse in result
            //          join user in SMOSECDbContext.Userman on assetse.use_man_id equals user.id
            //          select new AssSelectOutputDto()
            //          {
            //              IsChecked = false,
            //              //IMAGE = assetse.IMAGE,
            //              //NAME = assetse.IMAGE,
            //              ASSID = assetse.uuid,
            //              SN = assetse.sn,
            //              USERNAME = user.name

            //          };
            return(LINQToDataTable.ToDataTable(result));
        }