示例#1
0
 ///<Summary>
 ///Initializer
 ///Initializer using primary key(s)
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///string id
 ///</parameters>
 public void Init(string id)
 {
     try
     {
         IDAOCustomers daoCustomers = _iCustomersRepository.SelectOne(id);
         _id            = daoCustomers.İd;
         _company       = daoCustomers.Company;
         _lastName      = daoCustomers.LastName;
         _firstName     = daoCustomers.FirstName;
         _emailAddress  = daoCustomers.EmailAddress;
         _jobTitle      = daoCustomers.JobTitle;
         _businessPhone = daoCustomers.BusinessPhone;
         _homePhone     = daoCustomers.HomePhone;
         _mobilePhone   = daoCustomers.MobilePhone;
         _faxNumber     = daoCustomers.FaxNumber;
         _address       = daoCustomers.Address;
         _city          = daoCustomers.City;
         _stateProvince = daoCustomers.StateProvince;
         _zipPostalCode = daoCustomers.ZipPostalCode;
         _countryRegion = daoCustomers.CountryRegion;
         _webPage       = daoCustomers.WebPage;
         _notes         = daoCustomers.Notes;
         _attachments   = daoCustomers.Attachments;
         _ctrVersion    = daoCustomers.CtrVersion;
     }
     catch
     {
         throw;
     }
 }
示例#2
0
        ///<Summary>
        ///Update
        ///This method updates one Customers record in the store
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///BOCustomers
        ///</parameters>
        public virtual void Update()
        {
            Doing(this);
            IDAOCustomers daoCustomers = _iCustomersRepository.New();

            RegisterDataObject(_iCustomersRepository, _iCustomersRepository.BaseData(daoCustomers));
            BeginTransaction(_iCustomersRepository, "updateBOCustomers");
            try
            {
                daoCustomers.İd            = _id;
                daoCustomers.Company       = _company;
                daoCustomers.LastName      = _lastName;
                daoCustomers.FirstName     = _firstName;
                daoCustomers.EmailAddress  = _emailAddress;
                daoCustomers.JobTitle      = _jobTitle;
                daoCustomers.BusinessPhone = _businessPhone;
                daoCustomers.HomePhone     = _homePhone;
                daoCustomers.MobilePhone   = _mobilePhone;
                daoCustomers.FaxNumber     = _faxNumber;
                daoCustomers.Address       = _address;
                daoCustomers.City          = _city;
                daoCustomers.StateProvince = _stateProvince;
                daoCustomers.ZipPostalCode = _zipPostalCode;
                daoCustomers.CountryRegion = _countryRegion;
                daoCustomers.WebPage       = _webPage;
                daoCustomers.Notes         = _notes;
                daoCustomers.Attachments   = _attachments;
                daoCustomers.CtrVersion    = _ctrVersion;
                _iCustomersRepository.Update(daoCustomers);
                CommitTransaction(_iCustomersRepository);
                Done(this);

                _id            = daoCustomers.İd;
                _company       = daoCustomers.Company;
                _lastName      = daoCustomers.LastName;
                _firstName     = daoCustomers.FirstName;
                _emailAddress  = daoCustomers.EmailAddress;
                _jobTitle      = daoCustomers.JobTitle;
                _businessPhone = daoCustomers.BusinessPhone;
                _homePhone     = daoCustomers.HomePhone;
                _mobilePhone   = daoCustomers.MobilePhone;
                _faxNumber     = daoCustomers.FaxNumber;
                _address       = daoCustomers.Address;
                _city          = daoCustomers.City;
                _stateProvince = daoCustomers.StateProvince;
                _zipPostalCode = daoCustomers.ZipPostalCode;
                _countryRegion = daoCustomers.CountryRegion;
                _webPage       = daoCustomers.WebPage;
                _notes         = daoCustomers.Notes;
                _attachments   = daoCustomers.Attachments;
                _ctrVersion    = daoCustomers.CtrVersion;
                _isDirty       = false;
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iCustomersRepository, "updateBOCustomers");
                Handle(this, ex);
            }
        }
示例#3
0
 ///<Summary>
 ///Constructor
 ///This constructor initializes the business object from its respective data object
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///DAOCustomers
 ///</parameters>
 protected internal BOCustomers(IDAOCustomers daoCustomers)
 {
     try
     {
         _id            = daoCustomers.İd;
         _company       = daoCustomers.Company;
         _lastName      = daoCustomers.LastName;
         _firstName     = daoCustomers.FirstName;
         _emailAddress  = daoCustomers.EmailAddress;
         _jobTitle      = daoCustomers.JobTitle;
         _businessPhone = daoCustomers.BusinessPhone;
         _homePhone     = daoCustomers.HomePhone;
         _mobilePhone   = daoCustomers.MobilePhone;
         _faxNumber     = daoCustomers.FaxNumber;
         _address       = daoCustomers.Address;
         _city          = daoCustomers.City;
         _stateProvince = daoCustomers.StateProvince;
         _zipPostalCode = daoCustomers.ZipPostalCode;
         _countryRegion = daoCustomers.CountryRegion;
         _webPage       = daoCustomers.WebPage;
         _notes         = daoCustomers.Notes;
         _attachments   = daoCustomers.Attachments;
         _ctrVersion    = daoCustomers.CtrVersion;
     }
     catch
     {
         throw;
     }
 }
示例#4
0
        ///<Summary>
        ///Update
        ///This method updates one Customers record in the store
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///BOCustomers
        ///</parameters>
        public virtual void Update()
        {
            Doing(this);
            IDAOCustomers daoCustomers = _iCustomersRepository.New();

            RegisterDataObject(_iCustomersRepository, _iCustomersRepository.BaseData(daoCustomers));
            BeginTransaction(_iCustomersRepository, "updateBOCustomers");
            try
            {
                daoCustomers.CustomerID   = _customerID;
                daoCustomers.CompanyName  = _companyName;
                daoCustomers.ContactName  = _contactName;
                daoCustomers.ContactTitle = _contactTitle;
                daoCustomers.Address      = _address;
                daoCustomers.City         = _city;
                daoCustomers.Region       = _region;
                daoCustomers.PostalCode   = _postalCode;
                daoCustomers.Country      = _country;
                daoCustomers.Phone        = _phone;
                daoCustomers.Fax          = _fax;
                daoCustomers.CtrVersion   = _ctrVersion;
                _iCustomersRepository.Update(daoCustomers);
                CommitTransaction(_iCustomersRepository);
                Done(this);

                _customerID   = daoCustomers.CustomerID;
                _companyName  = daoCustomers.CompanyName;
                _contactName  = daoCustomers.ContactName;
                _contactTitle = daoCustomers.ContactTitle;
                _address      = daoCustomers.Address;
                _city         = daoCustomers.City;
                _region       = daoCustomers.Region;
                _postalCode   = daoCustomers.PostalCode;
                _country      = daoCustomers.Country;
                _phone        = daoCustomers.Phone;
                _fax          = daoCustomers.Fax;
                _ctrVersion   = daoCustomers.CtrVersion;
                _isDirty      = false;
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iCustomersRepository, "updateBOCustomers");
                Handle(this, ex);
            }
        }
示例#5
0
        ///<Summary>
        ///Delete
        ///This method deletes one Customers record from the store
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///
        ///</parameters>
        public virtual void Delete()
        {
            Doing(this);
            IDAOCustomers daoCustomers = _iCustomersRepository.New();

            RegisterDataObject(_iCustomersRepository, _iCustomersRepository.BaseData(daoCustomers));
            BeginTransaction(_iCustomersRepository, "deleteBOCustomers");
            try
            {
                daoCustomers.CustomerID = _customerID;
                _iCustomersRepository.Delete(daoCustomers);
                CommitTransaction(_iCustomersRepository);
                Done(this);
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iCustomersRepository, "deleteBOCustomers");
                Handle(this, ex);
            }
        }
示例#6
0
 ///<Summary>
 ///Constructor
 ///This constructor initializes the business object from its respective data object
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///DAOCustomers
 ///</parameters>
 protected internal BOCustomers(IDAOCustomers daoCustomers)
 {
     try
     {
         _customerID   = daoCustomers.CustomerID;
         _companyName  = daoCustomers.CompanyName;
         _contactName  = daoCustomers.ContactName;
         _contactTitle = daoCustomers.ContactTitle;
         _address      = daoCustomers.Address;
         _city         = daoCustomers.City;
         _region       = daoCustomers.Region;
         _postalCode   = daoCustomers.PostalCode;
         _country      = daoCustomers.Country;
         _phone        = daoCustomers.Phone;
         _fax          = daoCustomers.Fax;
         _ctrVersion   = daoCustomers.CtrVersion;
     }
     catch
     {
         throw;
     }
 }
示例#7
0
 ///<Summary>
 ///Initializer
 ///Initializer using primary key(s)
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///string customerID
 ///</parameters>
 public void Init(string customerID)
 {
     try
     {
         IDAOCustomers daoCustomers = _iCustomersRepository.SelectOne(customerID);
         _customerID   = daoCustomers.CustomerID;
         _companyName  = daoCustomers.CompanyName;
         _contactName  = daoCustomers.ContactName;
         _contactTitle = daoCustomers.ContactTitle;
         _address      = daoCustomers.Address;
         _city         = daoCustomers.City;
         _region       = daoCustomers.Region;
         _postalCode   = daoCustomers.PostalCode;
         _country      = daoCustomers.Country;
         _phone        = daoCustomers.Phone;
         _fax          = daoCustomers.Fax;
         _ctrVersion   = daoCustomers.CtrVersion;
     }
     catch
     {
         throw;
     }
 }
示例#8
0
 public virtual void Delete(IDAOCustomers daoCustomers)
 {
     daoCustomers.Delete();
 }
示例#9
0
 public virtual void Update(IDAOCustomers daoCustomers)
 {
     daoCustomers.Update();
 }
示例#10
0
 public virtual void Insert(IDAOCustomers daoCustomers)
 {
     daoCustomers.Insert();
 }
示例#11
0
 public virtual IzNorthwindConn_BaseData BaseData(IDAOCustomers daoCustomers)
 {
     return((IzNorthwindConn_BaseData)(DAOCustomers)daoCustomers);
 }