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; }
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; }
public SupplierRegisterEntity Insert(SupplierRegisterEntity _SupplierRegisterEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_SupplierRegisterEntity, true); } return _SupplierRegisterEntity; }
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; }
public bool Update(SupplierRegisterEntity _SupplierRegisterEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_SupplierRegisterEntity, filter); toReturn = true; } return toReturn; }
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; }
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; }