예제 #1
0
        public BllSelectedControlName MapToBll(DalSelectedControlName entity)
        {
            ControlNameService controlNameService = new ControlNameService(uow);
            var bllControlName = entity.ControlName_id != null?controlNameService.Get((int)entity.ControlName_id) : null;

            BllSelectedControlName bllEntity = new BllSelectedControlName
            {
                Id          = entity.Id,
                ControlName = bllControlName
            };

            return(bllEntity);
        }
        public BllControl MapToBll(DalControl entity)
        {
            BllControl bllEntity = new BllControl
            {
                Id          = entity.Id,
                ControlName = entity.ControlName_id != null?controlNameService.Get((int)entity.ControlName_id) : null,
                                  EmployeeLib = entity.EmployeeLib_id != null?employeeLibService.Get((int)entity.EmployeeLib_id) : null,
                                                    ControlMethodDocumentationLib = entity.ControlMethodDocumentationLib_id != null?controlMethodDocumentationLibService.Get((int)entity.ControlMethodDocumentationLib_id) : null,
                                                                                        EquipmentLib = entity.EquipmentLib_id != null?equipmentLibService.Get((int)entity.EquipmentLib_id) : null,
                                                                                                           ImageLib = entity.ImageLib_id != null?imageLibService.Get((int)entity.ImageLib_id) : null,
                                                                                                                          RequirementDocumentationLib = entity.RequirementDocumentationLib_id != null?requirementDocumentationLibService.Get((int)entity.RequirementDocumentationLib_id) : null,
                                                                                                                                                            ResultLib = entity.ResultLib_id != null?resultLibService.Get((int)entity.ResultLib_id) : null,
                                                                                                                                                                            Additionally   = entity.Additionally,
                                                                                                                                                                            IsControlled   = entity.IsControlled,
                                                                                                                                                                            Light          = entity.Light,
                                                                                                                                                                            Number         = entity.Number,
                                                                                                                                                                            ProtocolNumber = entity.ProtocolNumber,
                                                                                                                                                                            Temperature    = entity.Temperature,
                                                                                                                                                                            ChiefEmployee  = entity.ChiefEmployee_id != null?employeeService.Get((int)entity.ChiefEmployee_id) : null,
            };

            return(bllEntity);
        }