/// <summary>
        /// 查询客户
        /// </summary>
        public void QueryClient()
        {
            DataTable dt = new ExtractInventoryTool_ClientBLL().QueryClient();
            QueryClientCallbackDel del = QueryClientCallback;

            dataGridView1.BeginInvoke(del, dt);
            return;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 查询客户
        /// </summary>
        public void QueryClient(string limit, string offset)
        {
            int       totalCount       = 0;
            DataTable dt               = new ExtractInventoryTool_ClientBLL().QueryClient(limit, offset, out totalCount);
            QueryClientCallbackDel del = QueryClientCallback;

            dataGridView1.BeginInvoke(del, dt, totalCount);
            return;
        }
 private void QueryClient()
 {
     try
     {
         DataTable dt = new ExtractInventoryTool_ClientBLL().QueryClient();
         _clientList = new List <ExtractInventoryTool_Client>();
         foreach (DataRow row in dt.Rows)
         {
             ExtractInventoryTool_Client client = new ExtractInventoryTool_Client();
             client.Oid        = row["Oid"] == DBNull.Value ? 0 : Convert.ToInt32(row["Oid"]);
             client.Name       = row["Name"] == DBNull.Value ? "" : (string)row["Name"];
             client.UniqueCode = row["UniqueCode"] == DBNull.Value ? "" : (string)row["UniqueCode"];
             _clientList.Add(client);
         }
         QueryClientCallbackDel del = QueryClientCallback;
         comboBox1.BeginInvoke(del, _clientList);
         return;
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog("QueryClient", ex);
     }
 }