示例#1
0
        /// <summary>
        ///
        /// </summary>
        void EditConnection()
        {
            var conn = dgConnections.SelectedItem as Connection;

            var dataForm = new ConnectionDataForm();

            if (dataForm.ShowModal(this, conn, this.serverTypes.ToList()) == ResultCodes.Apply)
            {
                Connection.AttachServerTypeObjects(conn, this.serverTypes.ToList());
                dgConnections.Items.Refresh();
            }
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        void AddConnection()
        {
            var dataForm = new ConnectionDataForm();

            if (dataForm.ShowModal(this, this.serverTypes.ToList()) == ResultCodes.Apply)
            {
                var conn = dataForm.GetEntity();
                Connection.AttachServerTypeObjects(conn, this.serverTypes.ToList());

                this.connections.Add(conn);
            }
        }