private void butPushBoth_Click(object sender, EventArgs e) { if (textDate.errorProvider1.GetError(textDate) != "") { MsgBox.Show(this, "Please fix error first."); return; } //Enter info into local DB before pushing out to others so we save it. int days = PIn.Int(textDays.Text); DateTime date = PIn.Date(textDate.Text); Prefs.UpdateString(PrefName.SecurityLockDate, POut.Date(date, false)); Prefs.UpdateInt(PrefName.SecurityLockDays, days); Prefs.UpdateBool(PrefName.SecurityLockIncludesAdmin, checkAdmin.Checked); Prefs.UpdateBool(PrefName.CentralManagerSecurityLock, checkEnable.Checked); FormCentralConnections FormCC = new FormCentralConnections(); FormCC.IsSelectionMode = true; FormCC.ShowDialog(); if (FormCC.DialogResult != DialogResult.OK) { return; } CodeBase.MsgBoxCopyPaste MsgBoxCopyPaste = new CodeBase.MsgBoxCopyPaste(CentralSyncHelper.PushBoth(FormCC.ListConnsSelected)); MsgBoxCopyPaste.ShowDialog(); }
private void butAdd_Click(object sender,EventArgs e) { FormCentralConnections FormCC=new FormCentralConnections(); FormCC.ListConns=_listConnsCur; FormCC.LabelText.Text=Lans.g(this,"Select connections then click OK to add them to the currently edited group."); FormCC.Text=Lans.g(this,"Group Connections"); FormCC.ShowDialog(); FillGrid(); }
private void butAddDatabases_Click(object sender, EventArgs e) { FormCentralConnections FormCC = new FormCentralConnections(); FormCC.Text = Lans.g("PatientTransfer", "Select Databases"); FormCC.IsSelectionMode = true; if (FormCC.ShowDialog() == DialogResult.OK) { _listConnectionsToTransferTo.AddRange(FormCC.ListConnsSelected.FindAll(x => !x.CentralConnectionNum.In(_listConnectionsToTransferTo.Select(y => y.CentralConnectionNum)))); FillDatabases(); } }
private void butPushLocks_Click(object sender, EventArgs e) { FormCentralConnections FormCC = new FormCentralConnections(); FormCC.IsSelectionMode = true; FormCC.ShowDialog(); if (FormCC.DialogResult != DialogResult.OK) { return; } CodeBase.MsgBoxCopyPaste MsgBoxCopyPaste = new CodeBase.MsgBoxCopyPaste(CentralSyncHelper.PushLocks(FormCC.ListConnsSelected)); MsgBoxCopyPaste.ShowDialog(); }
private void menuConnSetup_Click(object sender, EventArgs e) { FormCentralConnections FormCC = new FormCentralConnections(); foreach (CentralConnection conn in _listConns) { FormCC.ListConns.Add(conn.Copy()); } FormCC.LabelText.Text = Lans.g("FormCentralConnections", "Double click an existing connection to edit or click the 'Add' button to add a new connection."); FormCC.Text = Lans.g("FormCentralConnections", "Connection Setup"); if (FormCC.ShowDialog() == DialogResult.OK) { _listConns = CentralConnections.GetConnections(); FillGrid(); } }
private void butAdd_Click(object sender, EventArgs e) { FormCentralConnections FormCC = new FormCentralConnections(_listConnsCur.Select(x => x.CentralConnectionNum).ToList()); foreach (CentralConnection conn in _listConns) { FormCC.ListConns.Add(conn.Copy()); //Add a copy of each CentralConnection to the FormCC's ListConns for display purposes. } FormCC.LabelText.Text = Lans.g(this, "Select connections then click OK to add them to the currently edited group."); FormCC.Text = Lans.g(this, "Group Connections"); if (FormCC.ShowDialog() == DialogResult.OK) { //Find all connections that do not already exist in _listConnsCur List <CentralConnection> listNewConns = FormCC.ListConns.FindAll(x => !_listConnsCur.Exists(y => y.CentralConnectionNum == x.CentralConnectionNum)); //Add them to _listConnsCur _listConnsCur.AddRange(listNewConns); } FillGrid(); }
private void butSync_Click(object sender, EventArgs e) { if (textDate.errorProvider1.GetError(textDate) != "") { MsgBox.Show(this, "Please fix error first."); return; } //Enter info into local DB before pushing out to others so we save it. int days = PIn.Int(textDays.Text); DateTime date = PIn.Date(textDate.Text); Prefs.UpdateString(PrefName.SecurityLockDate, POut.Date(date, false)); Prefs.UpdateInt(PrefName.SecurityLockDays, days); Prefs.UpdateBool(PrefName.SecurityLockIncludesAdmin, checkAdmin.Checked); Prefs.UpdateBool(PrefName.CentralManagerSecurityLock, checkEnable.Checked); FormCentralConnections FormCC = new FormCentralConnections(); FormCC.LabelText.Text = Lans.g("CentralSecurity", "Sync will create or update the Central Management users, passwords, and user groups to all selected databases."); FormCC.Text = Lans.g("CentralSecurity", "Sync Security"); foreach (CentralConnection conn in ListConns) { FormCC.ListConns.Add(conn.Copy()); } List <CentralConnection> listSelectedConns = new List <CentralConnection>(); if (FormCC.ShowDialog() == DialogResult.OK) { listSelectedConns = FormCC.ListConns; } else { return; } MsgBoxCopyPaste MsgBoxCopyPaste = new MsgBoxCopyPaste(CentralSyncHelper.SyncAll(listSelectedConns)); MsgBoxCopyPaste.ShowDialog(); }
private void butSyncUsers_Click(object sender, EventArgs e) { FormCentralConnections FormCC = new FormCentralConnections(); FormCC.LabelText.Text = Lans.g("CentralSecurity", "Sync will create or update the Central Management users, passwords, and user groups to all selected databases."); FormCC.Text = Lans.g("CentralSecurity", "Sync Security"); foreach (CentralConnection conn in ListConns) { FormCC.ListConns.Add(conn.Copy()); } List <CentralConnection> listSelectedConns = new List <CentralConnection>(); if (FormCC.ShowDialog() == DialogResult.OK) { listSelectedConns = FormCC.ListConns; } else { return; } MsgBoxCopyPaste MsgBoxCopyPaste = new MsgBoxCopyPaste(CentralSyncHelper.SyncUsers(listSelectedConns)); MsgBoxCopyPaste.ShowDialog(); }
private void butSync_Click(object sender,EventArgs e) { if(textDate.errorProvider1.GetError(textDate)!="") { MsgBox.Show(this,"Please fix error first."); return; } //Enter info into local DB before pushing out to others so we save it. int days=PIn.Int(textDays.Text); DateTime date=PIn.Date(textDate.Text); Prefs.UpdateString(PrefName.SecurityLockDate,POut.Date(date,false)); Prefs.UpdateInt(PrefName.SecurityLockDays,days); Prefs.UpdateBool(PrefName.SecurityLockIncludesAdmin,checkAdmin.Checked) ; Prefs.UpdateBool(PrefName.CentralManagerSecurityLock,checkEnable.Checked); List<CentralConnection> listChosenConns=new List<CentralConnection>(); FormCentralConnections FormCC=new FormCentralConnections(); FormCC.LabelText.Text=Lans.g("CentralSecuritiy","Sync will create or update the Central Management users, passwords, and user groups to all selected databases."); FormCC.Text=Lans.g("CentralSecurity","Sync Security"); FormCC.ShowDialog(); if(FormCC.DialogResult==DialogResult.OK) { listChosenConns=FormCC.ListConns; } else { return; } SyncAll(listChosenConns); DialogResult=DialogResult.OK; }
private void menuConnSetup_Click(object sender,EventArgs e) { FormCentralConnections FormCC=new FormCentralConnections(); FormCC.LabelText.Text=Lans.g("FormCentralConnections","Double click an existing connection to edit or click the 'Add' button to add a new connection."); FormCC.Text=Lans.g("FormCentralConnections","Connection Setup"); FormCC.ShowDialog(); FillGrid(); }