public static void OpenModelsInSw() { int rowindex = GetModels.resultsDataGridView.CurrentCell.RowIndex; int modelId = Convert.ToInt32(GetModels.resultsDataGridView.Rows[rowindex].Cells[0].Value.ToString()); string modelName = GetModels.resultsDataGridView.Rows[rowindex].Cells[1].Value.ToString(); string modelDest = Utils.CreateAndSaveModelFromBytesInFolder(modelName, DataBaseUtil.getModelFileById(modelId)); SldWorks swApp = Activator.CreateInstance(Type.GetTypeFromProgID("SldWorks.Application")) as SldWorks; swApp.Visible = false; swApp.OpenDoc6(modelDest, (int)swDocumentTypes_e.swDocPART, (int)swOpenDocOptions_e.swOpenDocOptions_LoadModel, "", 0, 0); }
public static bool ConnectionValidator(string login, string password) { return(DataBaseUtil.isUserInDb(login, password)); }