///<Summary> ///Update ///This method updates one InventoryTransactions record in the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOInventoryTransactions ///</parameters> public virtual void Update() { Doing(this); IDAOInventoryTransactions daoInventoryTransactions = _iInventoryTransactionsRepository.New(); RegisterDataObject(_iInventoryTransactionsRepository, _iInventoryTransactionsRepository.BaseData(daoInventoryTransactions)); BeginTransaction(_iInventoryTransactionsRepository, "updateBOInventoryTransactions"); try { daoInventoryTransactions.Id = _id; daoInventoryTransactions.TransactionType = _transactionType; daoInventoryTransactions.TransactionCreatedDate = _transactionCreatedDate; daoInventoryTransactions.TransactionModifiedDate = _transactionModifiedDate; daoInventoryTransactions.ProductId = _productId; daoInventoryTransactions.Quantity = _quantity; daoInventoryTransactions.PurchaseOrderId = _purchaseOrderId; daoInventoryTransactions.CustomerOrderId = _customerOrderId; daoInventoryTransactions.Comments = _comments; daoInventoryTransactions.CtrVersion = _ctrVersion; _iInventoryTransactionsRepository.Update(daoInventoryTransactions); CommitTransaction(_iInventoryTransactionsRepository); Done(this); _id = daoInventoryTransactions.Id; _transactionType = daoInventoryTransactions.TransactionType; _transactionCreatedDate = daoInventoryTransactions.TransactionCreatedDate; _transactionModifiedDate = daoInventoryTransactions.TransactionModifiedDate; _productId = daoInventoryTransactions.ProductId; _quantity = daoInventoryTransactions.Quantity; _purchaseOrderId = daoInventoryTransactions.PurchaseOrderId; _customerOrderId = daoInventoryTransactions.CustomerOrderId; _comments = daoInventoryTransactions.Comments; _ctrVersion = daoInventoryTransactions.CtrVersion; _isDirty = false; } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iInventoryTransactionsRepository, "updateBOInventoryTransactions"); Handle(this, ex); } }
///<Summary> ///Constructor ///This constructor initializes the business object from its respective data object ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///DAOInventoryTransactions ///</parameters> protected internal BOInventoryTransactions(IDAOInventoryTransactions daoInventoryTransactions) { try { _id = daoInventoryTransactions.Id; _transactionType = daoInventoryTransactions.TransactionType; _transactionCreatedDate = daoInventoryTransactions.TransactionCreatedDate; _transactionModifiedDate = daoInventoryTransactions.TransactionModifiedDate; _productId = daoInventoryTransactions.ProductId; _quantity = daoInventoryTransactions.Quantity; _purchaseOrderId = daoInventoryTransactions.PurchaseOrderId; _customerOrderId = daoInventoryTransactions.CustomerOrderId; _comments = daoInventoryTransactions.Comments; _ctrVersion = daoInventoryTransactions.CtrVersion; } catch { throw; } }
///<Summary> ///Initializer ///Initializer using primary key(s) ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///string id ///</parameters> public void Init(string id) { try { IDAOInventoryTransactions daoInventoryTransactions = _iInventoryTransactionsRepository.SelectOne(id); _id = daoInventoryTransactions.Id; _transactionType = daoInventoryTransactions.TransactionType; _transactionCreatedDate = daoInventoryTransactions.TransactionCreatedDate; _transactionModifiedDate = daoInventoryTransactions.TransactionModifiedDate; _productId = daoInventoryTransactions.ProductId; _quantity = daoInventoryTransactions.Quantity; _purchaseOrderId = daoInventoryTransactions.PurchaseOrderId; _customerOrderId = daoInventoryTransactions.CustomerOrderId; _comments = daoInventoryTransactions.Comments; _ctrVersion = daoInventoryTransactions.CtrVersion; } catch { throw; } }
///<Summary> ///Delete ///This method deletes one InventoryTransactions record from the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> /// ///</parameters> public virtual void Delete() { Doing(this); IDAOInventoryTransactions daoInventoryTransactions = _iInventoryTransactionsRepository.New(); RegisterDataObject(_iInventoryTransactionsRepository, _iInventoryTransactionsRepository.BaseData(daoInventoryTransactions)); BeginTransaction(_iInventoryTransactionsRepository, "deleteBOInventoryTransactions"); try { daoInventoryTransactions.Id = _id; _iInventoryTransactionsRepository.Delete(daoInventoryTransactions); CommitTransaction(_iInventoryTransactionsRepository); Done(this); } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iInventoryTransactionsRepository, "deleteBOInventoryTransactions"); Handle(this, ex); } }
///<Summary> ///AddInventoryTransactions ///This method persists a BOInventoryTransactions object to the database collection ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOInventoryTransactions ///</parameters> public virtual void AddInventoryTransactions(IBOInventoryTransactions boInventoryTransactions) { Doing(this); IDAOInventoryTransactions daoInventoryTransactions = _iInventoryTransactionsRepository.New(); RegisterDataObject(_iInventoryTransactionsRepository, _iInventoryTransactionsRepository.BaseData(daoInventoryTransactions)); BeginTransaction(_iInventoryTransactionsRepository, "addInventoryTransactions"); try { daoInventoryTransactions.Id = boInventoryTransactions.Id; daoInventoryTransactions.TransactionType = boInventoryTransactions.TransactionType; daoInventoryTransactions.TransactionCreatedDate = boInventoryTransactions.TransactionCreatedDate; daoInventoryTransactions.TransactionModifiedDate = boInventoryTransactions.TransactionModifiedDate; daoInventoryTransactions.Quantity = boInventoryTransactions.Quantity; daoInventoryTransactions.PurchaseOrderId = boInventoryTransactions.PurchaseOrderId; daoInventoryTransactions.CustomerOrderId = boInventoryTransactions.CustomerOrderId; daoInventoryTransactions.Comments = boInventoryTransactions.Comments; daoInventoryTransactions.ProductId = _id; _iInventoryTransactionsRepository.Insert(daoInventoryTransactions); CommitTransaction(_iInventoryTransactionsRepository); Done(this); /*pick up any primary keys, computed values etc*/ boInventoryTransactions = new BOInventoryTransactions(daoInventoryTransactions); if (_boInventoryTransactionsCollection != null) { _boInventoryTransactionsCollection.Add(boInventoryTransactions); } } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iInventoryTransactionsRepository, "addInventoryTransactions"); Handle(this, ex); } }
public virtual void Delete(IDAOInventoryTransactions daoInventoryTransactions) { daoInventoryTransactions.Delete(); }
public virtual void Update(IDAOInventoryTransactions daoInventoryTransactions) { daoInventoryTransactions.Update(); }
public virtual void Insert(IDAOInventoryTransactions daoInventoryTransactions) { daoInventoryTransactions.Insert(); }
public virtual IzNorthwindClassLibrayConn_BaseData BaseData(IDAOInventoryTransactions daoInventoryTransactions) { return((IzNorthwindClassLibrayConn_BaseData)(DAOInventoryTransactions)daoInventoryTransactions); }