Example #1
0
        public void Delete(List <long> idList)
        {
            List <Data.Entity.Employee> entity = new List <Data.Entity.Employee>();

            foreach (var id in idList)
            {
                entity.Add(EmployeeDao.Find(id));
            }
            foreach (var id in idList)
            {
                EmployeeDao.Delete(id);
            }
        }
        public Data.Entity.CheckUp Convert(CheckUpParam param, Data.Entity.CheckUp oldentity)
        {
            Data.Entity.CheckUp entity = null;

            if (oldentity != null)
            {
                entity = oldentity;
            }
            else
            {
                entity = new Data.Entity.CheckUp
                {
                    Code        = param.Code,
                    Id          = param.Id,
                    Description = param.Description,
                    Name        = param.Name
                };
            }

            entity.CheckUpEnd    = param.CheckUpEnd;
            entity.CheckUpStart  = param.CheckUpStart;
            entity.CheckUpStatus = CheckUpStatusDao.Find(param.CheckUpStatusId);
            entity.Customer      = CustomerDao.Find(param.CustomerId);
            entity.Employee      = EmployeeDao.Find(param.EmployeeId);
            entity.IssueList     = param.IssueList;
            entity.PartList      = param.PartList;
            entity.Price         = param.Price;
            entity.Vehicle       = VehicleDao.Find(param.VehicleId);

            return(entity);
        }