//Изменение объекта
        private void Btn_ObjectEdite_Click(object sender, RoutedEventArgs e)
        {
            selectObject = (Objects)grid_objects.SelectedItem;
            if (selectObject != null)
            {
                ObjectWindows OW = new ObjectWindows(selectObject);

                if (OW.ShowDialog() == true)
                {
                    if (App.bd.EditObject(selectObject) == false)
                    {
                        return;
                    }
                    UpdateData(selectObject);
                }
            }
        }
        //Создание нового объекта
        private void Btn_ObjectCreate_Click(object sender, RoutedEventArgs e)
        {
            Objects obj = new Objects();

            obj.ID      = Guid.NewGuid();
            obj.Status  = new Guid("2692C961-ACD3-4516-A0E3-C79B89E428A2");
            obj.AgentID = Properties.Settings.Default.User_ID;

            ObjectWindows OW = new ObjectWindows(obj);

            if (OW.ShowDialog() == true)
            {
                if (App.bd.CreateObject(obj) == false)
                {
                    return;
                }
                UpdateData(obj);
            }
        }