예제 #1
0
        public ActionReturn Insert(Models.CompDetail comp)
        {
            DB.CompDetail compDetail = Assgin(comp);
            _dbCommands.Insert(compDetail);
            bool status = _dbCommands.Save();

            return(new ActionReturn()
            {
                Id = compDetail.CId,
                Status = status
            });
        }
예제 #2
0
        private List <Models.CompDetail> GetCompDetail(DB.CompDetail source)
        {
            List <Models.CompDetail> _compDetail = new List <Models.CompDetail>();

            _compDetail.Add(new Models.CompDetail()
            {
                Id       = source.CId,
                Name     = source.CName,
                Location = GetLocationDetail(_dbCommands.FetchRecords <DB.LocationDetail>("refernceid", source.CId).ToList()),
                Status   = source.CStatus,
                IsActive = source.IsActive
            });
            return(_compDetail);
        }