Esempio n. 1
0
        private void dataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex != -1)
            {
                DnsZone       dnsZone = (DnsZone)dataGridView.Rows[e.RowIndex].DataBoundItem;
                DnsZoneEditor editor  = new DnsZoneEditor();
                editor.ReflectDataToForm(dnsZone);
                DialogResult result = editor.ShowDialog();

                if (result == DialogResult.OK)
                {
                    editor.ReflectFormToData(dnsZone);
                    dnsZone.PendingAction = ChildPendingAction.Update;
                    bindingList.ResetBindings();
                }
            }
        }
Esempio n. 2
0
        private void addbutton_Click(object sender, EventArgs e)
        {
            DnsZone zone = new DnsZone(RhspDataID.Generate());

            zone.PendingAction = ChildPendingAction.Create;

            DnsZoneEditor editor = new DnsZoneEditor();

            editor.ReflectDataToForm(zone);
            DialogResult result = editor.ShowDialog();

            if (result == DialogResult.OK)
            {
                editor.ReflectFormToData(zone);
                resultList.Add(zone);
                bindingList.Add(zone);
                bindingList.ResetBindings();
                ChangeMade();
            }
        }