using System; using System.Collections.Generic; using System.Text; using System.Data; using DBFactory; using ICommLayer; using CommLayerFactory; namespace BarcodeCheck { public class CBarcodeCheck { public static IGetDeviceState cds;//20100127 public static DBOperator dbo = new DBOperator(); public static bool BarCodeCheck(int taskIndex, int deviceIndex, string barcode) { int[] ret;//20100127 try { //20100127 cds = CommModeCreate.CreateGetDeviceState(deviceIndex); //ret[0]任务号 ret[1]设备索引 //20100127 ret = cds.GetDeviceState(deviceIndex, taskIndex); string bc = string.Empty; for (int i = 2; i < 12; i++) { bc = bc + Convert.ToString(ret[i]); } if (bc == barcode) { return true; } else { return false; } } catch (Exception ex) {//20100127 throw ex; } finally {//20100127 ret = null; } } } }