///<Summary> ///Constructor ///This constructor initializes the business object from its respective data object ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///DAOSuppliers ///</parameters> protected internal BOSuppliers(IDAOSuppliers daoSuppliers) { try { _id = daoSuppliers.İd; _company = daoSuppliers.Company; _lastName = daoSuppliers.LastName; _firstName = daoSuppliers.FirstName; _emailAddress = daoSuppliers.EmailAddress; _jobTitle = daoSuppliers.JobTitle; _businessPhone = daoSuppliers.BusinessPhone; _homePhone = daoSuppliers.HomePhone; _mobilePhone = daoSuppliers.MobilePhone; _faxNumber = daoSuppliers.FaxNumber; _address = daoSuppliers.Address; _city = daoSuppliers.City; _stateProvince = daoSuppliers.StateProvince; _zipPostalCode = daoSuppliers.ZipPostalCode; _countryRegion = daoSuppliers.CountryRegion; _webPage = daoSuppliers.WebPage; _notes = daoSuppliers.Notes; _attachments = daoSuppliers.Attachments; _ctrVersion = daoSuppliers.CtrVersion; } catch { throw; } }
///<Summary> ///Initializer ///Initializer using primary key(s) ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///string id ///</parameters> public void Init(string id) { try { IDAOSuppliers daoSuppliers = _iSuppliersRepository.SelectOne(id); _id = daoSuppliers.İd; _company = daoSuppliers.Company; _lastName = daoSuppliers.LastName; _firstName = daoSuppliers.FirstName; _emailAddress = daoSuppliers.EmailAddress; _jobTitle = daoSuppliers.JobTitle; _businessPhone = daoSuppliers.BusinessPhone; _homePhone = daoSuppliers.HomePhone; _mobilePhone = daoSuppliers.MobilePhone; _faxNumber = daoSuppliers.FaxNumber; _address = daoSuppliers.Address; _city = daoSuppliers.City; _stateProvince = daoSuppliers.StateProvince; _zipPostalCode = daoSuppliers.ZipPostalCode; _countryRegion = daoSuppliers.CountryRegion; _webPage = daoSuppliers.WebPage; _notes = daoSuppliers.Notes; _attachments = daoSuppliers.Attachments; _ctrVersion = daoSuppliers.CtrVersion; } catch { throw; } }
///<Summary> ///Update ///This method updates one Suppliers record in the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOSuppliers ///</parameters> public virtual void Update() { Doing(this); IDAOSuppliers daoSuppliers = _iSuppliersRepository.New(); RegisterDataObject(_iSuppliersRepository, _iSuppliersRepository.BaseData(daoSuppliers)); BeginTransaction(_iSuppliersRepository, "updateBOSuppliers"); try { daoSuppliers.İd = _id; daoSuppliers.Company = _company; daoSuppliers.LastName = _lastName; daoSuppliers.FirstName = _firstName; daoSuppliers.EmailAddress = _emailAddress; daoSuppliers.JobTitle = _jobTitle; daoSuppliers.BusinessPhone = _businessPhone; daoSuppliers.HomePhone = _homePhone; daoSuppliers.MobilePhone = _mobilePhone; daoSuppliers.FaxNumber = _faxNumber; daoSuppliers.Address = _address; daoSuppliers.City = _city; daoSuppliers.StateProvince = _stateProvince; daoSuppliers.ZipPostalCode = _zipPostalCode; daoSuppliers.CountryRegion = _countryRegion; daoSuppliers.WebPage = _webPage; daoSuppliers.Notes = _notes; daoSuppliers.Attachments = _attachments; daoSuppliers.CtrVersion = _ctrVersion; _iSuppliersRepository.Update(daoSuppliers); CommitTransaction(_iSuppliersRepository); Done(this); _id = daoSuppliers.İd; _company = daoSuppliers.Company; _lastName = daoSuppliers.LastName; _firstName = daoSuppliers.FirstName; _emailAddress = daoSuppliers.EmailAddress; _jobTitle = daoSuppliers.JobTitle; _businessPhone = daoSuppliers.BusinessPhone; _homePhone = daoSuppliers.HomePhone; _mobilePhone = daoSuppliers.MobilePhone; _faxNumber = daoSuppliers.FaxNumber; _address = daoSuppliers.Address; _city = daoSuppliers.City; _stateProvince = daoSuppliers.StateProvince; _zipPostalCode = daoSuppliers.ZipPostalCode; _countryRegion = daoSuppliers.CountryRegion; _webPage = daoSuppliers.WebPage; _notes = daoSuppliers.Notes; _attachments = daoSuppliers.Attachments; _ctrVersion = daoSuppliers.CtrVersion; _isDirty = false; } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iSuppliersRepository, "updateBOSuppliers"); Handle(this, ex); } }
///<Summary> ///Update ///This method updates one Suppliers record in the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOSuppliers ///</parameters> public virtual void Update() { Doing(this); IDAOSuppliers daoSuppliers = _iSuppliersRepository.New(); RegisterDataObject(_iSuppliersRepository, _iSuppliersRepository.BaseData(daoSuppliers)); BeginTransaction(_iSuppliersRepository, "updateBOSuppliers"); try { daoSuppliers.SupplierID = _supplierID; daoSuppliers.CompanyName = _companyName; daoSuppliers.ContactName = _contactName; daoSuppliers.ContactTitle = _contactTitle; daoSuppliers.Address = _address; daoSuppliers.City = _city; daoSuppliers.Region = _region; daoSuppliers.PostalCode = _postalCode; daoSuppliers.Country = _country; daoSuppliers.Phone = _phone; daoSuppliers.Fax = _fax; daoSuppliers.HomePage = _homePage; daoSuppliers.CtrVersion = _ctrVersion; _iSuppliersRepository.Update(daoSuppliers); CommitTransaction(_iSuppliersRepository); Done(this); _supplierID = daoSuppliers.SupplierID; _companyName = daoSuppliers.CompanyName; _contactName = daoSuppliers.ContactName; _contactTitle = daoSuppliers.ContactTitle; _address = daoSuppliers.Address; _city = daoSuppliers.City; _region = daoSuppliers.Region; _postalCode = daoSuppliers.PostalCode; _country = daoSuppliers.Country; _phone = daoSuppliers.Phone; _fax = daoSuppliers.Fax; _homePage = daoSuppliers.HomePage; _ctrVersion = daoSuppliers.CtrVersion; _isDirty = false; } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iSuppliersRepository, "updateBOSuppliers"); Handle(this, ex); } }
///<Summary> ///Delete ///This method deletes one Suppliers record from the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> /// ///</parameters> public virtual void Delete() { Doing(this); IDAOSuppliers daoSuppliers = _iSuppliersRepository.New(); RegisterDataObject(_iSuppliersRepository, _iSuppliersRepository.BaseData(daoSuppliers)); BeginTransaction(_iSuppliersRepository, "deleteBOSuppliers"); try { daoSuppliers.İd = _id; _iSuppliersRepository.Delete(daoSuppliers); CommitTransaction(_iSuppliersRepository); Done(this); } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iSuppliersRepository, "deleteBOSuppliers"); Handle(this, ex); } }
///<Summary> ///Constructor ///This constructor initializes the business object from its respective data object ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///DAOSuppliers ///</parameters> protected internal BOSuppliers(IDAOSuppliers daoSuppliers) { try { _supplierID = daoSuppliers.SupplierID; _companyName = daoSuppliers.CompanyName; _contactName = daoSuppliers.ContactName; _contactTitle = daoSuppliers.ContactTitle; _address = daoSuppliers.Address; _city = daoSuppliers.City; _region = daoSuppliers.Region; _postalCode = daoSuppliers.PostalCode; _country = daoSuppliers.Country; _phone = daoSuppliers.Phone; _fax = daoSuppliers.Fax; _homePage = daoSuppliers.HomePage; _ctrVersion = daoSuppliers.CtrVersion; } catch { throw; } }
///<Summary> ///Initializer ///Initializer using primary key(s) ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///Int32 supplierID ///</parameters> public void Init(Int32 supplierID) { try { IDAOSuppliers daoSuppliers = _iSuppliersRepository.SelectOne(supplierID); _supplierID = daoSuppliers.SupplierID; _companyName = daoSuppliers.CompanyName; _contactName = daoSuppliers.ContactName; _contactTitle = daoSuppliers.ContactTitle; _address = daoSuppliers.Address; _city = daoSuppliers.City; _region = daoSuppliers.Region; _postalCode = daoSuppliers.PostalCode; _country = daoSuppliers.Country; _phone = daoSuppliers.Phone; _fax = daoSuppliers.Fax; _homePage = daoSuppliers.HomePage; _ctrVersion = daoSuppliers.CtrVersion; } catch { throw; } }
public virtual void Delete(IDAOSuppliers daoSuppliers) { daoSuppliers.Delete(); }
public virtual void Update(IDAOSuppliers daoSuppliers) { daoSuppliers.Update(); }
public virtual void Insert(IDAOSuppliers daoSuppliers) { daoSuppliers.Insert(); }
public virtual IzNorthwindConn_BaseData BaseData(IDAOSuppliers daoSuppliers) { return((IzNorthwindConn_BaseData)(DAOSuppliers)daoSuppliers); }