private void OnNewResourceExecute(object obj) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { string filename = openFileDialog.FileName; } var newdoc = new Document(); newdoc.PartID = DetailPart.Id; newdoc.DocumentView = "Drawing"; newdoc.Description = "Blah, Blah,Blah"; newdoc.DocumentPath = ".txt"; _partService.AddPartResources(newdoc); }