예제 #1
0
        ///<Summary>
        ///Update
        ///This method updates one CustomerDemographics record in the store
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///BOCustomerDemographics
        ///</parameters>
        public virtual void Update()
        {
            Doing(this);
            IDAOCustomerDemographics daoCustomerDemographics = _iCustomerDemographicsRepository.New();

            RegisterDataObject(_iCustomerDemographicsRepository, _iCustomerDemographicsRepository.BaseData(daoCustomerDemographics));
            BeginTransaction(_iCustomerDemographicsRepository, "updateBOCustomerDemographics");
            try
            {
                daoCustomerDemographics.CustomerTypeID = _customerTypeID;
                daoCustomerDemographics.CustomerDesc   = _customerDesc;
                daoCustomerDemographics.CtrVersion     = _ctrVersion;
                _iCustomerDemographicsRepository.Update(daoCustomerDemographics);
                CommitTransaction(_iCustomerDemographicsRepository);
                Done(this);

                _customerTypeID = daoCustomerDemographics.CustomerTypeID;
                _customerDesc   = daoCustomerDemographics.CustomerDesc;
                _ctrVersion     = daoCustomerDemographics.CtrVersion;
                _isDirty        = false;
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iCustomerDemographicsRepository, "updateBOCustomerDemographics");
                Handle(this, ex);
            }
        }
예제 #2
0
 ///<Summary>
 ///Constructor
 ///This constructor initializes the business object from its respective data object
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///DAOCustomerDemographics
 ///</parameters>
 protected internal BOCustomerDemographics(IDAOCustomerDemographics daoCustomerDemographics)
 {
     try
     {
         _customerTypeID = daoCustomerDemographics.CustomerTypeID;
         _customerDesc   = daoCustomerDemographics.CustomerDesc;
         _ctrVersion     = daoCustomerDemographics.CtrVersion;
     }
     catch
     {
         throw;
     }
 }
예제 #3
0
 ///<Summary>
 ///Initializer
 ///Initializer using primary key(s)
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///string customerTypeID
 ///</parameters>
 public void Init(string customerTypeID)
 {
     try
     {
         IDAOCustomerDemographics daoCustomerDemographics = _iCustomerDemographicsRepository.SelectOne(customerTypeID);
         _customerTypeID = daoCustomerDemographics.CustomerTypeID;
         _customerDesc   = daoCustomerDemographics.CustomerDesc;
         _ctrVersion     = daoCustomerDemographics.CtrVersion;
     }
     catch
     {
         throw;
     }
 }
예제 #4
0
        ///<Summary>
        ///Delete
        ///This method deletes one CustomerDemographics record from the store
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///
        ///</parameters>
        public virtual void Delete()
        {
            Doing(this);
            IDAOCustomerDemographics daoCustomerDemographics = _iCustomerDemographicsRepository.New();

            RegisterDataObject(_iCustomerDemographicsRepository, _iCustomerDemographicsRepository.BaseData(daoCustomerDemographics));
            BeginTransaction(_iCustomerDemographicsRepository, "deleteBOCustomerDemographics");
            try
            {
                daoCustomerDemographics.CustomerTypeID = _customerTypeID;
                _iCustomerDemographicsRepository.Delete(daoCustomerDemographics);
                CommitTransaction(_iCustomerDemographicsRepository);
                Done(this);
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iCustomerDemographicsRepository, "deleteBOCustomerDemographics");
                Handle(this, ex);
            }
        }
예제 #5
0
 public virtual void Delete(IDAOCustomerDemographics daoCustomerDemographics)
 {
     daoCustomerDemographics.Delete();
 }
예제 #6
0
 public virtual void Update(IDAOCustomerDemographics daoCustomerDemographics)
 {
     daoCustomerDemographics.Update();
 }
예제 #7
0
 public virtual void Insert(IDAOCustomerDemographics daoCustomerDemographics)
 {
     daoCustomerDemographics.Insert();
 }
예제 #8
0
 public virtual IzNorthwindRestApiConn_BaseData BaseData(IDAOCustomerDemographics daoCustomerDemographics)
 {
     return((IzNorthwindRestApiConn_BaseData)(DAOCustomerDemographics)daoCustomerDemographics);
 }