private NSGView() { this.nsg = null; this.enterprise = null; InitializeComponent(); }
public static void editNSG(VSDSession session, Enterprise enterprise, NSGateway nsg) { NSGView nv = new NSGView(); nv.session = session; nv.enterprise = enterprise; nv.nsg = nsg; nv.ShowDialog(); }
private void button7_Click(object sender, EventArgs e) { if (listBox1.SelectedItem == null) { return; } NSGateway nsg = new NSGateway(); nsg.NUId = ((ComboboxItem)listBox1.SelectedItem).Id; nsg.fetch(this.session); NSGView.editNSG(this.session, this.enterprise, nsg); updateNSGs(); }
private void button1_Click(object sender, EventArgs e) { if (this.nsg == null) { NSGateway nsg = new NSGateway(); nsg.NUName = textBox1.Text; ComboboxItem ci = (ComboboxItem)comboBox1.SelectedItem; nsg.NUTemplateID = ci.Id; this.enterprise.createChild(this.session, nsg); } else { this.nsg.NUName = textBox1.Text; this.nsg.save(this.session); } this.Close(); }