This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If chkRailCar.Checked = True Then C1 = C1 & "Y" Else C1 = C1 & "N" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<clear/> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void cmdGetFormats_Click(object sender, EventArgs e) | |
{ | |
lbFormats.DataSource = (await _service.Get()).ToList(); | |
lbFormats.DisplayMember = "Description"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlbumFormatService _service; | |
public frmMain() | |
{ | |
InitializeComponent(); | |
_service = new AlbumFormatService(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PortableClient.WebApi.Dal.Interfaces; | |
using RecordKeeper.Portable.Models; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace PortableClient.WebApi.Dal.Services | |
{ | |
public class AlbumFormatService : IEntityService<AlbumFormat> | |
{ | |
private static readonly string API_PATH = "AlbumFormat"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using RecordKeeper.Portable.Models; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace PortableClient.WebApi.Dal.Services |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using RecordKeeper.Portable.Models; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Threading.Tasks; | |
namespace PortableClient.WebApi.Dal.Interfaces | |
{ | |
public interface IEntityService<TEntity> where TEntity : EntityBase | |
{ | |
Task<IEnumerable<TEntity>> Get(ICredentials credentials = null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ArrayOfAlbumFormat xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RecordKeeper.Portable.Models"> | |
<AlbumFormat> | |
<Description>Compact Disc</Description> | |
<Id>CD</Id> | |
</AlbumFormat> | |
<AlbumFormat> | |
<Description>Vinyl Record</Description> | |
<Id>Record</Id> | |
</AlbumFormat> | |
</ArrayOfAlbumFormat> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"Id":"CD","Description":"Compact Disc"},{"Id":"Record","Description":"Vinyl Record"}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace RecordKeeperApi.Controllers | |
{ | |
public class AlbumFormatController : ApiController | |
{ | |
private IFormatRepository _repository; | |
public AlbumFormatController() : this(new FormatRepository()) { } | |
public AlbumFormatController(IFormatRepository repository) | |
{ | |
_repository = repository; |