public void AddComputer(string nsName, string ip, string userFio, string division) { if ((userFio == "-") && (division == "-")) { AddComputer(nsName, ip); } else if ((userFio != "-") && (division == "-")) { AddComputer(nsName, ip, userFio); } else if ((userFio == "-") && (division != "-")) { CompList.Add(new ComputerVM { NsName = nsName, Ip = ip, DivisionName = division }); } else if ((userFio != "-") && (division != "-")) { CompList.Add(new ComputerVM { NsName = nsName, Ip = ip, UserFio = userFio, DivisionName = division }); } }
public void AddComputer(string nsName, string ip) { CompList.Add(new ComputerVM { NsName = nsName, Ip = ip }); }
public void AddComputer(string nsName, string ip, string userFio) { CompList.Add(new ComputerVM { NsName = nsName, Ip = ip, UserFio = userFio }); }
private void ClearFields() { IntArrayProp = new int[2]; ComplexProp = new ComplexClass1(); CheckBox = false; Lines = new string[0]; StringProp = ""; CompList.Clear(); CompList.Add(new ComplexClass2(4, 5)); CompList.Add(null); CompList.Add(new ComplexClass2(6, 7)); BoolList.Clear(); BoolList.Add(true); BoolList.Add(false); BoolList.Add(true); SetDebugDisplays(); }
public List <CompExtention.Component> GetTableAsComponent() { List <string> Tables = new List <string>(); Builder.Data.ComponentBuilder cb = new Builder.Data.ComponentBuilder(this.Connection); List <CompExtention.Component> CompList; CompList = ComponentDataHandler.GetComponents(this.Connection); Tables = cb.GetTables(); foreach (string s in Tables) { var c = CompList.Where(x => x.TableName == s).FirstOrDefault(); if (c == null) { var comp = new Component(s, ComponentType.none); comp.TableName = s; CompList.Add(comp); } } return(CompList.OrderBy(x => x.TableName).ToList()); }
public void RemoveComputer(ComputerVM delComp) { CompList.Remove(delComp); }
private void btn_competences_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { CompList Comp = new CompList(); this.NavigationService.Navigate(Comp); }