private void dansearchbutton_Click(object sender, RoutedEventArgs e) { SearchObject so = daninfosearch.DataContext as SearchObject; if (null == so.GetPropertyValue("SecondStair")) { so.SetPropertyValue("org", so.GetPropertyValue("FirstStair"), false); } else { if (null == so.GetPropertyValue("ThirdStair")) { so.SetPropertyValue("org", so.GetPropertyValue("FirstStair") + "." + so.GetPropertyValue("SecondStair"), false); } else { if (null == so.GetPropertyValue("FourthStair")) { so.SetPropertyValue("org", so.GetPropertyValue("FirstStair") + "." + so.GetPropertyValue("SecondStair") + "." + so.GetPropertyValue("ThirdStair"), false); } else { if (null == so.GetPropertyValue("f_sgoperator")) { so.SetPropertyValue("org", so.GetPropertyValue("FirstStair") + "." + so.GetPropertyValue("SecondStair") + "." + so.GetPropertyValue("ThirdStair") + "." + so.GetPropertyValue("FourthStair"), false); } } } } so.Search(); }