/// <summary> /// Gets the scheme by scheme identifier. /// </summary> /// <param name="schemeID">The scheme identifier.</param> /// <returns></returns> public SchemesBO GetSchemeBySchemeID(int schemeID) { SchemesBO scheme = new SchemesBO(); ObjectMapper.Map(StoreRepository.GetSchemeBySchemeID(schemeID), scheme); return(scheme); }
/// <summary> /// Updates the scheme. /// </summary> /// <param name="scheme">The scheme.</param> /// <returns></returns> public bool UpdateScheme(SchemesBO scheme) { bool isSuccess = false; Scheme dealerScheme = new Scheme(); ObjectMapper.Map(scheme, dealerScheme); if (dealerScheme != null && dealerScheme.SchemeID > 0) { isSuccess = StoreRepository.UpdateScheme(dealerScheme); } return(isSuccess); }
/// <summary> /// Inserts the scheme. /// </summary> /// <param name="scheme">The scheme.</param> /// <returns></returns> public bool InsertScheme(SchemesBO scheme) { bool isSuccess = false; Scheme dealerScheme = new Scheme(); ObjectMapper.Map(scheme, dealerScheme); if (dealerScheme != null) { isSuccess = StoreRepository.InsertScheme(dealerScheme); } return(isSuccess); }