Beispiel #1
0
        //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);
            }
        }
Beispiel #2
0
 private void toolStripMenuItem_conn_Click(object sender, EventArgs e)
 {
     if (RemotingConfig.SetConf())
     {
         RemotingConfig.ReadConf();
     }
 }
Beispiel #3
0
 /// <summary>
 /// 设置连接
 /// </summary>
 /// <returns></returns>
 private static bool ConnSet()
 {
     return(RemotingConfig.SetConf());
     //return Common.DBHelper.SqlConn.ConnectionSetting();
 }