Exemplo n.º 1
0
        private void ProcessSqlObjectAddCustomClientBegin()
        {
            if (treeView1.SelectedNode.Tag == null || !(treeView1.SelectedNode.Tag is ObjectWithClientSpecific objectAdd) || cbVersions.SelectedItem == null || !(cbVersions.SelectedItem is VersionObjectCounter versionObjectCounter))
            {
                return;
            }

            using var frm = new FCustomClient();
            Program.Settings.PositionLoad(frm);
            frm.Refill(ClientCode.List().Except(objectAdd.ClientCodeList()).ToList());
            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                currentObjectEdited = new ObjectToImport()
                {
                    VersionId     = versionObjectCounter.VersionId,
                    TypeObjectId  = objectAdd.TypeObjectId,
                    ObjectSchema  = objectAdd.ObjectSchema,
                    ObjectName    = objectAdd.ObjectName,
                    ObjectColumn  = objectAdd.ObjectColumn,
                    ObjectDeleted = false,
                    ObjectEmpty   = false,
                    ClientCodeId  = frm.ClientCode.ClientCodeId,
                    ObjectSql     = objectAdd.ObjectSql
                };

                BeginAddSqlObjectUpdateDisplay(EAction.SqlObjectAddCustomClientEnd, $"Ajout d'une implémentation pour {frm.ClientCode.ClientCodeName} de {objectAdd}");
            }

            Program.Settings.PositionSave(frm);
        }
Exemplo n.º 2
0
        public FEditBase()
        {
            InitializeComponent();

            cbAuthentification.Items.Clear();
            cbAuthentification.Items.Add("Autentification Windows");
            cbAuthentification.Items.Add("Autentification SQL Server");
            cbAuthentification.SelectedIndex = 0;

            cbClientCode.DataSource = null;
            cbClientCode.DataSource = ClientCode.List();

            FillUiFromObject();

            btOk.Enabled = ControlUI();
        }