Friday, June 10, 2011

WPF update other UI control from cyrrent window.

In our application sometimes we need that when we perform any cloud operation the it will take effect to other
UI control. hare is the sample:
  
private void LoadWMSComboInBuildingUI()
        {
            try
            {
                BuildingSetup obj;
                foreach (Window objWindow in Application.Current.Windows)
                {
                    string[] splitedNamespace = (objWindow.ToString()).Split('.');
                    string aClassNameFromCollection = splitedNamespace[splitedNamespace.Length - 1];
                    if (aClassNameFromCollection == "BuildingSetup")
                    {
                        obj = (BuildingSetup)objWindow;
                        obj.buildingTypecomboBox.Items.Clear();
                        BBuildingSetup ObjBBuildingSetup = new BBuildingSetup( foreach (EBuildingSetup objEclient in ObjBBuildingSetup.GetAllBuildingTYpe())
                        {
                                         obj.buildingTypecomboBox.Items.Add(objEclient.BuildingType);
                        }
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Combobox reloading problem", "Client Info", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }





Thank you.

SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...