コード例 #1
0
        public bool Save(SupplierDetailsDto newDetails)
        {
            this.supplier = newDetails.DtoToEntity();

            if (this._supplier.Insert(this.supplier).IsNull())
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
        public static ChainSawEntity.Supplier DtoToEntity(this SupplierDetailsDto dto)
        {
            ChainSawEntity.Supplier entity = null;

            if (!dto.IsNull())
            {
                entity = new ChainSawEntity.Supplier
                {
                    SupplierID   = dto.SupplierId,
                    SupplierCode = dto.SupplierCode,
                    SupplierName = dto.SupplierName,
                    DateCreated  = dto.DateCreated,
                    CreatedBy    = dto.CreatedBy
                };
            }

            return(entity);
        }
コード例 #3
0
 public SupplierService(IIOBalanceRepository <Supplier> supplier)
 {
     this._supplier = supplier;
     this.supplier  = new ChainSawDBEntity.Supplier();
 }