예제 #1
0
 public bool Delete(Guid Id)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         SupplierRegisterEntity _SupplierRegisterEntity = new SupplierRegisterEntity(Id);
         if (adapter.FetchEntity(_SupplierRegisterEntity))
         {
             adapter.DeleteEntity(_SupplierRegisterEntity);
             toReturn = true;
         }
     }
     return toReturn;
 }
예제 #2
0
        public SupplierRegisterEntity Insert(string UserName, string Email, string SupplierName, string SupplierTypeId, string Phone, string CountryCode, string CityCode, string DistrictCode, string Address, string AboutContents, bool Approved, string AutomationCode, DateTime CreatedDate)
        {
            SupplierRegisterEntity _SupplierRegisterEntity = new SupplierRegisterEntity();
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {

                _SupplierRegisterEntity.UserName = UserName;
                _SupplierRegisterEntity.Email = Email;
                _SupplierRegisterEntity.SupplierName = SupplierName;
                _SupplierRegisterEntity.SupplierTypeId = SupplierTypeId;
                _SupplierRegisterEntity.Phone = Phone;
                _SupplierRegisterEntity.CountryCode = CountryCode;
                _SupplierRegisterEntity.CityCode = CityCode;
                _SupplierRegisterEntity.DistrictCode = DistrictCode;
                _SupplierRegisterEntity.Address = Address;
                _SupplierRegisterEntity.AboutContents = AboutContents;
                _SupplierRegisterEntity.Approved = Approved;
                _SupplierRegisterEntity.AutomationCode = AutomationCode;
                _SupplierRegisterEntity.CreatedDate = CreatedDate;
                adapter.SaveEntity(_SupplierRegisterEntity, true);
            }
            return _SupplierRegisterEntity;
        }
예제 #3
0
 public SupplierRegisterEntity Insert(SupplierRegisterEntity _SupplierRegisterEntity)
 {
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.SaveEntity(_SupplierRegisterEntity, true);
     }
     return _SupplierRegisterEntity;
 }
예제 #4
0
        public bool Update(Guid Id, string UserName, string Email, string SupplierName, string SupplierTypeId, string Phone, string CountryCode, string CityCode, string DistrictCode, string Address, string AboutContents, bool Approved, string AutomationCode, DateTime CreatedDate)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                SupplierRegisterEntity _SupplierRegisterEntity = new SupplierRegisterEntity(Id);
                if (adapter.FetchEntity(_SupplierRegisterEntity))
                {

                    _SupplierRegisterEntity.UserName = UserName;
                    _SupplierRegisterEntity.Email = Email;
                    _SupplierRegisterEntity.SupplierName = SupplierName;
                    _SupplierRegisterEntity.SupplierTypeId = SupplierTypeId;
                    _SupplierRegisterEntity.Phone = Phone;
                    _SupplierRegisterEntity.CountryCode = CountryCode;
                    _SupplierRegisterEntity.CityCode = CityCode;
                    _SupplierRegisterEntity.DistrictCode = DistrictCode;
                    _SupplierRegisterEntity.Address = Address;
                    _SupplierRegisterEntity.AboutContents = AboutContents;
                    _SupplierRegisterEntity.Approved = Approved;
                    _SupplierRegisterEntity.AutomationCode = AutomationCode;
                    _SupplierRegisterEntity.CreatedDate = CreatedDate;
                    adapter.SaveEntity(_SupplierRegisterEntity, true);
                    toReturn = true;
                }
            }
            return toReturn;
        }
예제 #5
0
 public bool Update(SupplierRegisterEntity _SupplierRegisterEntity, RelationPredicateBucket filter)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.UpdateEntitiesDirectly(_SupplierRegisterEntity, filter);
         toReturn = true;
     }
     return toReturn;
 }
예제 #6
0
        public bool Update(SupplierRegisterEntity _SupplierRegisterEntity)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                RelationPredicateBucket filter = new RelationPredicateBucket();
                IPredicateExpression _PredicateExpression = new PredicateExpression();
                _PredicateExpression.Add(SupplierRegisterFields.Id == _SupplierRegisterEntity.Id);

                filter.PredicateExpression.Add(_PredicateExpression);

                adapter.UpdateEntitiesDirectly(_SupplierRegisterEntity, filter);
                toReturn = true;
            }
            return toReturn;
        }
예제 #7
0
 public SupplierRegisterEntity SelectOne(Guid Id)
 {
     SupplierRegisterEntity toReturn = null;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         SupplierRegisterEntity _SupplierRegisterEntity = new SupplierRegisterEntity(Id);
         if (adapter.FetchEntity(_SupplierRegisterEntity))
         {
             toReturn = _SupplierRegisterEntity;
         }
     }
     return toReturn;
 }