public bool GetProposalsFromManager() { using (var cli = new PersistServiceClient()) { cli.Open(); bool saveOk; proposalsList = cli.LoadProposals(); cli.Close(); } return(true); }
public bool GetPoliticiansFromManager() { using (var cli = new PersistServiceClient()) { cli.Open(); bool saveOk; politiciansList = cli.LoadPoliticians(); cli.Close(); } return(true); }
public bool PersistData() { using (var cli = new PersistServiceClient()) { cli.Open(); bool saveOk; saveOk = cli.SaveElectors(electorsQueue); saveOk = cli.SaveElectorProposals(electorProposalsQueue); cli.Close(); } return(true); }
public bool VerifyAndPersist(string userName, string password) { using (var cli = new PersistServiceClient()) { cli.Open(); bool saveOk; try { saveOk = cli.SaveProposals(proposalsQueue, userName, password); saveOk = cli.SavePoliticians(politiciansQueue, userName, password); saveOk = cli.SavePoliticianProposals(politicianProposalsQueue, userName, password); } catch (FaultException <AutenticationException> ex) { cli.Close(); return(false); } cli.Close(); return(true); } }