namespace WCFInterfaces
{
[ServiceContractAttribute()]
public interface IBewiseSyncSyncContract
[OperationContract()]
SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession);
SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession);
SyncSchema GetSchema(Collection<string> tableNames, SyncSession syncSession);
SyncServerInfo GetServerInfo(SyncSession syncSession);
}
<system.serviceModel>
<services>
<service name="WCFService.BewiseSyncSyncService" behaviorConfiguration="WCFService.BewiseSyncSyncServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/BewiseSyncService" />
</baseAddresses>
</host>
<endpoint address="/ws"
binding="wsHttpBinding"
contract="WCFInterfaces.IBewiseSyncSyncContract" >
</endpoint>
<endpoint address="/mex"
binding="mexHttpBinding"
contract="WCFInterfaces.IBewiseSyncSyncContract" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFService.BewiseSyncSyncServiceBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
BewiseProxyService.BewiseSyncSyncContractClient serviceProxy;
private void Form1_Load(object sender, EventArgs e)
serviceProxy = new
WCFClient.BewiseProxyService.BewiseSyncSyncContractClient("WSHttpBinding_IBewiseSyncSyncContract");
Bind();
private void Bind()
this.employeTableAdapter.Fill(this.bewisDataSet.Employe);
this.clientTypeTableAdapter.Fill(this.bewisDataSet.ClientType);
this.clientTableAdapter.Fill(this.bewisDataSet.Client);
private void btnSynchronize_Click(object sender, EventArgs e)
this.Cursor = Cursors.WaitCursor;
BewiseSyncSyncAgent myAgent = new BewiseSyncSyncAgent(serviceProxy);
myAgent.Synchronize();
this.Cursor = Cursors.Default;
public partial class BewiseSyncSyncAgent {
partial void OnInitialized(){
this.Client.SyncDirection = SyncDirection.Bidirectional;
this.Employe.SyncDirection = SyncDirection.Bidirectional;