//public static FormMain _mainFrm; /// <summary> /// 连接检查 /// </summary> /// <returns></returns> private static bool ConnCheck() { try { RemotingConfig.ReadConf(); //string strSql = @"select getdate()"; //Hashtable parames = new Hashtable(); //EohiDataRemoteObject.RemotingSQLHelper remotingSQLHelper = (EohiDataRemoteObject.RemotingSQLHelper)Activator.GetObject( // typeof(EohiDataRemoteObject.RemotingSQLHelper), RemotingConfig.RetmotingSqlAddress); //EohiDataRemoteObject.RemotingSQLResult result = remotingSQLHelper.getDataTable(strSql, parames); //if (result.Code > 0) //{ // return false; //} //else //{ // return true; //} return(true); } catch (Exception exp) { MessageBox.Show(exp.Message); return(false); } }
private void toolStripMenuItem_conn_Click(object sender, EventArgs e) { if (RemotingConfig.SetConf()) { RemotingConfig.ReadConf(); } }
/// <summary> /// 设置连接 /// </summary> /// <returns></returns> private static bool ConnSet() { return(RemotingConfig.SetConf()); //return Common.DBHelper.SqlConn.ConnectionSetting(); }