![]() | Login |
Login and create an AuthTicket.
using System; using System.Collections.Generic; using System.IO; using System.Linq; using FRAM.WcfService.Public.Example.BussgodsReference; namespace FRAM.WcfService.Public.Example { class Program { public static byte COUNTY_CODE = 53; public static string USERNAME = "user@domain.xyx"; public static string PASSWORD = "password"; public static FRAMServiceClient _bussgods = new FRAMServiceClient(); public static AuthTicket authTicket; static void Main(string[] args) { LoginAndCreateAuthTicket(); Console.WriteLine("Press Any Key..."); Console.ReadKey(); } static void LoginAndCreateAuthTicket() { // Login var user = _bussgods.Login(USERNAME, PASSWORD); if (!user.Result) { Console.WriteLine(user.Message); return; } // AuthTicket (for use with all other calls) authTicket = new AuthTicket { CountyCode = COUNTY_CODE, Token = user.Data.Token, Username = USERNAME }; Console.WriteLine(""); } } }