namespace AccessService { [ServiceContract] public interface IService1 { [OperationContract] string GetData(int value); [OperationContract] string GetProvider(string IP, string Serial); [OperationContract] DatabaseProviderProp SendConnectionProv(DatabaseProviderProp Composite); } [DataContract] public class DatabaseProviderProp { string ServIP; string DbName; [DataMember] public string ServerIP { get { return ServIP; } set { ServIP = value; } } [DataMember] public string DatabaseName { get { return DbName; } set { DbName = value; } } } }
namespace AccessService { public class AccessServ : IService1 { public string GetData(int value) { return string.Format("You entered: {0}", value); } public string GetProvider(string IP, string Serial) { ConnectionProviders ConProv = new ConnectionProviders(); if (ConProv.CheckIP(IP) == true) { if (ConProv.SearchSerial(Serial) == true) { return "Ok"; } else { if (ConProv.ExProperty == null) { return "Eror In Serial Or Your Requst IP"; } else { return ConProv.ExProperty; } } } else { if (ConProv.ExProperty == null) { return "Eror In Serial Or Your Requst IP"; } else { return ConProv.ExProperty; } } } public DatabaseProviderProp SendConnectionProv(string Serial) { DatabaseProviderProp Database = new DatabaseProviderProp(); Database.DatabaseName = "Hi All"; return Database; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)