public static bool SetSecurityData(SqlConnection cn, IWin32Window owner = null) { SecurityOperations secOp = new SecurityOperations(cn, true, true); DialogResult dgRes; if (owner == null) { dgRes = secOp.ShowDialog(); } else { dgRes = secOp.ShowDialog(owner); } return(dgRes == DialogResult.OK); }
public loadAgr(bool useCurrent, bool loadPhoto, bool loadJudges, long?compForService, XmlClient client, MainForm.AfetrStopCallBack callback, SqlConnection _cn) { SqlConnection cn = new SqlConnection(_cn.ConnectionString); if (cn.State != ConnectionState.Open) { cn.Open(); } this.Client = new XmlClient(client.BaseUrl, client.CompId, SecurityOperations.CreateSigningDelegate(cn), SecurityOperations.GetPassword(cn)) { Proxy = client.Proxy, Timeout = client.Timeout }; this.useCurrent = useCurrent; this.loadJudges = loadJudges; this.loadPhoto = loadPhoto; this.Callback = callback; this.compForService = compForService; }