Esempio n. 1
0
        public bool Delete(AccountCatalog catalog)
        {
            var  tmpCatalogEntity = AccountCatalogConvertor.Convert(catalog);
            bool tmpExecuteResult = this.catalogDataAccess.Delete(tmpCatalogEntity);

            return(tmpExecuteResult);
        }
Esempio n. 2
0
        public bool Update(AccountCatalog catalog)
        {
            var tmpCatalogEntity = AccountCatalogConvertor.Convert(catalog);

            tmpCatalogEntity.UpdateTime = System.DateTime.Now;
            bool tmpUpdateResult = this.catalogDataAccess.Update(tmpCatalogEntity);

            return(tmpUpdateResult);
        }
Esempio n. 3
0
        public AccountCatalog GetAccountCatalog(int catalogId)
        {
            AccountCatalog tmpCatalogInfo = null;

            var tmpCatalogEntity = this.catalogDataAccess.GetCatalogEntity(catalogId);

            if (tmpCatalogEntity != null)
            {
                tmpCatalogInfo = AccountCatalogConvertor.Convert(tmpCatalogEntity);
            }

            return(tmpCatalogInfo);
        }
Esempio n. 4
0
        public bool New(AccountCatalog catalog)
        {
            var tmpCatalogEntity = AccountCatalogConvertor.Convert(catalog);

            tmpCatalogEntity.UpdateTime = tmpCatalogEntity.CreateTime = System.DateTime.Now;
            var tmpCreateResult = this.catalogDataAccess.Create(tmpCatalogEntity);

            if (tmpCreateResult)
            {
                catalog.CatalogId = tmpCatalogEntity.CatalogId;
            }

            return(tmpCreateResult);
        }
Esempio n. 5
0
        public System.Collections.Generic.IList <AccountCatalog> GetAccountCatalogs()
        {
            System.Collections.Generic.IList <AccountCatalog> tmpAccountCatalogs = null;

            var tmpCatalogEntities = this.catalogDataAccess.GetCatalogEntities();

            if (tmpCatalogEntities != null && tmpCatalogEntities.Count > 0)
            {
                tmpAccountCatalogs = new System.Collections.Generic.List <AccountCatalog>(tmpCatalogEntities.Count);
                foreach (AccountCatalogEntity tmpCatalogEntity in tmpCatalogEntities)
                {
                    tmpAccountCatalogs.Add(AccountCatalogConvertor.Convert(tmpCatalogEntity));
                }
            }

            return(tmpAccountCatalogs);
        }