private void InitDeviceType(string[] type, string year) { DataTable dt = DeviceTypeHelper.GetDeviceTypes(type); if (dt.Rows.Count > 0) { string strID = dt.Rows[0]["id"].ToString(); string dtype = dt.Rows[0]["class"].ToString(); UCDeviceBase device = null; device = createInstance(dtype); device.ID = strID; device.ProjectID = Itop.Client.MIS.ProgUID; showDevice(device); string strCon = " year(cast(OperationYear as datetime))<" + year + " and Type='" + strID + "' "; device.Statictable(strCon); curDevice = device; } }