Example #1
0
        private void btCarChara_Click(object sender, EventArgs e)
        {
            CIPS.ClTable ct = CIPS.Dictionary.DictTables.LoadClTable(txtWeb.Text, "DC_RA_CARCHARA", "", 1);
            string       s;

            if (ct != null)
            {
                s = MakeCarChara.BuildCS("..\\..\\..\\CIPS.DB\\CIPS.DB\\CarChara.cs", ct.GetDataTable());
            }
            else
            {
                s = "无法打开数据";
            }
            MessageBox.Show(this, s, "Build DC_RA_CARCHARA");
        }
Example #2
0
 /// <summary>
 /// 以CLTABLE格式读表
 /// </summary>
 /// <param name="web">WEB地址</param>
 /// <param name="tablename">表名</param>
 /// <param name="param">参数</param>
 /// <param name="index">数据库索引</param>
 /// <returns>成功返回CLTABLE格式的表</returns>
 public static CIPS.ClTable LoadClTable(CIPS.Dictionary.WebDict.Service web, string tablename, string param, int index)
 {
     CIPS.ClTable dt = null;
     try
     {
         web.Timeout = 300000;
         byte[] b = web.GetClTable(tablename, param, index);
         dt = new ClTable(b);
         System.Console.WriteLine(tablename + "读WEB:成功(CL)");
     }
     catch (Exception ex)
     {
         System.Console.WriteLine(tablename + "读WEB失败(CL):" + ex.ToString());
     }
     return(dt);
 }