public bool Delete(Guid SupplierId, string UserName) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { SupplierAccountEntity _SupplierAccountEntity = new SupplierAccountEntity(SupplierId, UserName); if (adapter.FetchEntity(_SupplierAccountEntity)) { adapter.DeleteEntity(_SupplierAccountEntity); toReturn = true; } } return toReturn; }
public bool Update(Guid SupplierId, string UserName, bool IsFullAccess) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { SupplierAccountEntity _SupplierAccountEntity = new SupplierAccountEntity(SupplierId, UserName); if (adapter.FetchEntity(_SupplierAccountEntity)) { _SupplierAccountEntity.IsFullAccess = IsFullAccess; adapter.SaveEntity(_SupplierAccountEntity, true); toReturn = true; } } return toReturn; }
public bool Update(SupplierAccountEntity _SupplierAccountEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_SupplierAccountEntity, filter); toReturn = true; } return toReturn; }
public bool Update(SupplierAccountEntity _SupplierAccountEntity) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { RelationPredicateBucket filter = new RelationPredicateBucket(); IPredicateExpression _PredicateExpression = new PredicateExpression(); _PredicateExpression.Add(SupplierAccountFields.SupplierId == _SupplierAccountEntity.SupplierId); _PredicateExpression.Add(SupplierAccountFields.UserName == _SupplierAccountEntity.UserName); filter.PredicateExpression.Add(_PredicateExpression); adapter.UpdateEntitiesDirectly(_SupplierAccountEntity, filter); toReturn = true; } return toReturn; }
public SupplierAccountEntity SelectOne(Guid SupplierId, string UserName) { SupplierAccountEntity toReturn = null; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { SupplierAccountEntity _SupplierAccountEntity = new SupplierAccountEntity(SupplierId, UserName); if (adapter.FetchEntity(_SupplierAccountEntity)) { toReturn = _SupplierAccountEntity; } } return toReturn; }
public SupplierAccountEntity Insert(bool IsFullAccess) { SupplierAccountEntity _SupplierAccountEntity = new SupplierAccountEntity(); using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { _SupplierAccountEntity.IsFullAccess = IsFullAccess; adapter.SaveEntity(_SupplierAccountEntity, true); } return _SupplierAccountEntity; }
public SupplierAccountEntity Insert(Guid SupplierId, string UserName, bool IsFullAccess) { SupplierAccountEntity _SupplierAccountEntity = new SupplierAccountEntity(); using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { _SupplierAccountEntity.SupplierId = SupplierId; _SupplierAccountEntity.UserName = UserName; _SupplierAccountEntity.IsFullAccess = IsFullAccess; adapter.SaveEntity(_SupplierAccountEntity, true); } return _SupplierAccountEntity; }
public SupplierAccountEntity Insert(SupplierAccountEntity _SupplierAccountEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_SupplierAccountEntity, true); } return _SupplierAccountEntity; }