public Router() { InitializeComponent(); obj = new models.Router(); isEditMode = false; Load(); }
public Router(models.Router lnk) { InitializeComponent(); obj = lnk; isEditMode = true; Load(); txtRoute.Text = obj.RouterID; var o1 = (from r in models.AppState.State.NodeGroups where r == obj.SourceNodeGroup select r).FirstOrDefault(); if (o1 != null) { cmbSourceNode.SelectedItem = o1; } var o2 = (from r in models.AppState.State.NodeGroups where r == obj.TargetNodeGroup select r).FirstOrDefault(); if (o1 != null) { cmbTargetNode.SelectedItem = o1; } }