private void Row_DoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left)
     {
         (main_grid.SelectedItem as ShopAlertViewModal).Color = "White";
         Defect_map DM = new Defect_map((main_grid.SelectedItem as ShopAlertViewModal).Id);
         DM.ShowDialog();
     }
 }
 private void TextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (!Authorization.Get.IsCeh)
     {
         if (((sender as Grid).DataContext as TreeViewModal).Spos_ustr == "Дефектация")
         {
             Defect_map DM = new Defect_map(((sender as Grid).DataContext as TreeViewModal).Id);
             DM.ShowDialog();
         }
     }
 }