///<Summary> ///Addİnvoices ///This method persists a BOİnvoices object to the database collection ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOİnvoices ///</parameters> public virtual void Addİnvoices(IBOİnvoices boİnvoices) { Doing(this); IDAOİnvoices daoİnvoices = _iİnvoicesRepository.New(); RegisterDataObject(_iİnvoicesRepository, _iİnvoicesRepository.BaseData(daoİnvoices)); BeginTransaction(_iİnvoicesRepository, "addİnvoices"); try { daoİnvoices.İd = boİnvoices.İd; daoİnvoices.İnvoiceDate = boİnvoices.İnvoiceDate; daoİnvoices.DueDate = boİnvoices.DueDate; daoİnvoices.Tax = boİnvoices.Tax; daoİnvoices.Shipping = boİnvoices.Shipping; daoİnvoices.AmountDue = boİnvoices.AmountDue; daoİnvoices.Orderİd = _id; _iİnvoicesRepository.Insert(daoİnvoices); CommitTransaction(_iİnvoicesRepository); Done(this); /*pick up any primary keys, computed values etc*/ boİnvoices = new BOInvoices(daoİnvoices); if (_boİnvoicesCollection != null) { _boİnvoicesCollection.Add(boİnvoices); } } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iİnvoicesRepository, "addİnvoices"); Handle(this, ex); } }
public İnvoicesVm(IBOİnvoices boİnvoices) { İd = boİnvoices.İd; Orderİd = boİnvoices.Orderİd; İnvoiceDate = boİnvoices.İnvoiceDate; DueDate = boİnvoices.DueDate; Tax = boİnvoices.Tax; Shipping = boİnvoices.Shipping; AmountDue = boİnvoices.AmountDue; }