private void AddAgentToLocalDatabase(Agent responseFromServer) { FormSample.AgentDatabase d = new AgentDatabase(); var existingAgent = d.GetAgentByEmail(responseFromServer.Email); if (existingAgent == null) { d.SaveItem(responseFromServer); } }
public ProductLocations() { try { AgentDatabase pdb = new AgentDatabase(); foreach (ProductInstall install in pdb.Data.ProductInstalls) { if (KnownUIDs.ContainsKey(install.Uid) && Directory.Exists(install.Settings.InstallPath)) { Add(new ProductLocation(KnownUIDs[install.Uid], Path.GetFullPath(install.Settings.InstallPath))); } } } catch { } }
private void BindAgent() { AgentDatabase d = new AgentDatabase(); var agentToUpdate = d.GetAgentByEmail(Settings.GeneralSettings); if (agentToUpdate != null) { id = agentToUpdate.Id; firstName.Text = agentToUpdate.FirstName; lastName.Text = agentToUpdate.LastName; email.Text = agentToUpdate.Email; agencyName.Text = agentToUpdate.AgencyName; phone.Text = agentToUpdate.Phone; } }
/// <summary> /// The execute submit command. /// </summary> /// <returns> The <see cref="Task"/>. </returns> private void CreateDatabase(Agent responseFromServer) { FormSample.AgentDatabase d = new AgentDatabase(); //var t = d.GetAgents(); d.SaveItem(responseFromServer);; }
public CustomerViewModel() { db = new AgentDatabase(); customerList = new ObservableCollection <Agent>(); BindCustomer(); }
private void UpdateAgent(Agent agentToUpdate) { AgentDatabase agent = new AgentDatabase(); agent.SaveItem(agentToUpdate); }