void view_SetToNullFired(StoredClassDataView view, DbObject arg2, string arg3)
 {
     DataGridUtils.SetValueByPath(arg2,arg3,null);
     AddEditedObject(view,arg2);
     view.RefreshData();
 }
        void view_EditDbObjectFired(StoredClassDataView view, DbObject rowDbObject, string bindingPath, DbObject fieldDbObject)
        {
            var dialogView = new StoredClassDataView();

            IConnection connection = view.StoredClass.Connection;

            if(fieldDbObject!=null)
                dialogView.StoredClass = fieldDbObject.Clazz;
            else
            {
                IList<IStoredClass> classes = connection.Objects;
                var box = new ComboBox();
                box.Height = 18;
                box.Width = 300;
                box.Name = "EditDbObject";

                box.ItemsSource = classes;

                if(!windowManager.ShowDialog(box, "What type of objects you want here?"))
                    return;

                dialogView.StoredClass = box.SelectedValue as IStoredClass;
            }

            dialogView.DataSource = connection.GetData(dialogView.StoredClass);

            if (!windowManager.ShowDialog(dialogView, "Edit"))
                return;

            DbObject newFieldDbObject = dialogView.GetSelectedObject();
            DataGridUtils.SetValueByPath(rowDbObject,bindingPath,newFieldDbObject);

            AddEditedObject(view,rowDbObject);
            view.RefreshData();
        }