public bool StartLocation(String currentepc) { ushort[] antennaList = new ushort[1] { 1 }; OPERATION_QUALIFER[] opList = new OPERATION_QUALIFER[1] { OPERATION_QUALIFER.LOCATE_TAG }; AntennaInfo antennaInfo = new AntennaInfo(antennaList, opList); try { m_ReaderAPI.Actions.TagLocationing.Perform(currentepc, antennaInfo); isReading = true; } catch (InvalidOperationException ioe) { //m_AppForm.notifyUser(ioe.Message, "Locate Operation"); MessageBox.Show("Tag Invalida", "Busqueda de EPC"); return(false); } catch (OperationFailureException ofe) { //m_AppForm.notifyUser(ofe.StatusDescription, "Locate Operation"); MessageBox.Show("Tag Invalida", "Busqueda de EPC"); return(false); } catch (InvalidUsageException iue) { //m_AppForm.notifyUser(iue.Info, "Locate Operation"); MessageBox.Show("Tag Invalida", "Busqueda de EPC"); return(false); } catch (Exception ex) { //m_AppForm.notifyUser(ex.Message, "Locate Operation"); MessageBox.Show("Tag Invalida", "Busqueda de EPC"); return(false); } return(true); }
private void locateButton_Click(object sender, EventArgs e) { if (locateButton.Text == "Start") { try { ushort[] antennaList = new ushort[1] { 1 }; OPERATION_QUALIFER[] opList = new OPERATION_QUALIFER[1] { OPERATION_QUALIFER.LOCATE_TAG }; AntennaInfo antennaInfo = new AntennaInfo(antennaList, opList); m_AppForm.m_ReaderAPI.Actions.TagLocationing.Perform(tagID_TB.Text, antennaInfo); locateButton.Text = "Stop"; } catch (InvalidOperationException ioe) { m_AppForm.functionCallStatusLabel.Text = ioe.Message; } catch (OperationFailureException ofe) { m_AppForm.functionCallStatusLabel.Text = ofe.StatusDescription; } catch (InvalidUsageException iue) { m_AppForm.functionCallStatusLabel.Text = iue.Info; } catch (Exception ex) { m_AppForm.functionCallStatusLabel.Text = ex.Message; } } else if (locateButton.Text == "Stop") { m_AppForm.m_ReaderAPI.Actions.TagLocationing.Stop(); locateButton.Text = "Start"; Locate_PB.Value = 0; } }
/// <summary> /// write tag /// </summary> /// <param name="TagID"></param> /// <param name="newTagID"></param> public void changeEPC(string TagID, string newTagID) { //m_ReaderAPI.Actions.TagAccess.WriteTagIDWait( ushort[] antennaList = new ushort[1] { 1 }; //OPERATION_QUALIFER[] opList = new OPERATION_QUALIFER[1] { OPERATION_QUALIFER. }; AntennaInfo antennaInfo = new AntennaInfo(antennaList /*, opList*/); TagAccess.WriteSpecificFieldAccessParams twriterparam = new TagAccess.WriteSpecificFieldAccessParams(); byte[] writeData = new byte[12]; for (int index = 0; index < 12; index += 2) { writeData[index] = byte.Parse(newTagID.Substring(index * 2, 2), System.Globalization.NumberStyles.HexNumber); writeData[index + 1] = byte.Parse(newTagID.Substring((index + 1) * 2, 2), System.Globalization.NumberStyles.HexNumber); } twriterparam.WriteData = writeData; twriterparam.WriteDataLength = 12; m_ReaderAPI.Actions.TagAccess.WriteTagIDWait(TagID, twriterparam, antennaInfo); }
public Entities.SiteInfo GetATPPendingBTS(string dbconfigscope, Int32 atpid) { string pathImage = ""; Entities.SiteInfo info = new Entities.SiteInfo(); DataTable GeotagList = GetGeotagDetail(dbconfigscope); Command = new SqlCommand("uspATP_GetIntegrationPending_BTS", GetConnectionType(dbconfigscope)); Command.CommandType = CommandType.StoredProcedure; SqlParameter prmATPID = new SqlParameter("@atpid", SqlDbType.BigInt); prmATPID.Value = atpid; Command.Parameters.Add(prmATPID); try { GetConnectionType(dbconfigscope).Open(); DataReader = Command.ExecuteReader(); if (DataReader.HasRows) { while (DataReader.Read()) { string[] GetBTSInfo_geoTag = GetValueFromDT(GeotagList, "bts", Convert.ToString(DataReader["workpackageid"])).Split(';'); string[] getAntennaInf_geoTag = GetValueFromDT(GeotagList, "antenna", Convert.ToString(DataReader["workpackageid"])).Split(';'); string[] getModuleInf_geoTag = GetValueFromDT(GeotagList, "module", Convert.ToString(DataReader["workpackageid"])).Split(';'); string[] getRFUInf_geoTag = GetValueFromDT(GeotagList, "rfu", Convert.ToString(DataReader["workpackageid"])).Split(';'); string[] getOtherModuleInf_geoTag = GetValueFromDT(GeotagList, "other module", Convert.ToString(DataReader["workpackageid"])).Split(';'); string[] getAntennaGPSInf_near_geoTag = GetValueFromDT(GeotagList, "antenna_gps_near", Convert.ToString(DataReader["workpackageid"])).Split(';'); string[] getAntennaGPSInf_far_geoTag = GetValueFromDT(GeotagList, "antenna_gps_far", Convert.ToString(DataReader["workpackageid"])).Split(';'); info.bscrnc = null; info.site_id = Convert.ToString(DataReader["siteno"]); info.site_name = Convert.ToString(DataReader["sitename"]); info.site_address = Convert.ToString(DataReader["site_address"]); info.kelurahan = "not applicable"; info.kecamatan = "not applicable"; info.province = "not applicable"; info.region = Convert.ToString(DataReader["rgnname"]); info.postal_code = "not applicable"; //info.Longitude = Convert.ToString(DataReader["longitude"]); //info.Latitude = Convert.ToString(DataReader["latitude"]); info.longitude = GetBTSInfo_geoTag[0].ToString(); info.latitude = GetBTSInfo_geoTag[1].ToString(); info.po_number = Convert.ToString(DataReader["pono"]); //DateTime onairdated = DataReader["onairdated"].Equals(DBNull.Value) ? null : Convert.ToDateTime(DataReader["onairdated"]); if (!DataReader["onairdated"].Equals(DBNull.Value)) { info.date_on_air = Convert.ToDateTime(DataReader["onairdated"]); } info.project_id = DataReader["projectid"].ToString(); info.site_type = DataReader["site_type"].ToString(); //info.bscrnc_name = Convert.ToString(DataReader["bscrnc_name"]); info.bts.vendor_rbsnodeb = "Nokia"; info.bts.site_status = Convert.ToString(DataReader["site_status"]); info.bts.cab_type = Convert.ToString(DataReader["cab_type"]); info.bts.connect_bscrnc = Convert.ToString(DataReader["connect_to_bsc_rnc_mme"]); info.bts.ne_id = Convert.ToString(DataReader["ne_id"]); if (dbconfigscope == StaticConfig.ConnectionTI2G) { info.bts.band = "2G"; } else if (dbconfigscope == StaticConfig.ConnectionTI3G) { info.bts.band = "3G"; } else { info.bts.band = "4G"; } info.bts.number_sector = Convert.ToInt16(DataReader["bts_sector_no"]); info.bts.bts_configuration = Convert.ToString(DataReader["bts_configuration"]); info.bts.btsnodeb_type = Convert.ToString(DataReader["bts_nodeb_type"]); info.bts.capacity = Convert.ToInt16(DataReader["ce_qty"]); info.bts.bts_installationtype = Convert.ToString(DataReader["bts_installation_type"]); info.bts.rack_sn = Convert.ToString(DataReader["rack_sn"]); info.bts.rack_productcode = Convert.ToString(DataReader["rack_productcode"]); info.bts.ref_id = Convert.ToInt64(DataReader["workpackageid"]); int bandwidth = DataReader["bandwidth"].Equals(DBNull.Value) ? 0 : Convert.ToInt16(DataReader["bandwidth"]); int license_power = DataReader["license_power"].Equals(DBNull.Value) ? 0 : Convert.ToInt16(DataReader["license_power"]); int rru_power = DataReader["rru_power"].Equals(DBNull.Value) ? 0 : Convert.ToInt16(DataReader["rru_power"]); int rru_quantity = DataReader["rru_quantity"].Equals(DBNull.Value) ? 0 : Convert.ToInt16(DataReader["rru_quantity"]); int dcpdb_quantity = DataReader["dcpdb_quantity"].Equals(DBNull.Value) ? 0 : Convert.ToInt16(DataReader["dcpdb_quantity"]); info.bts.ne_name = Convert.ToString(DataReader["ne_name"]); info.bts.bandtype_code = Convert.ToString(DataReader["bandtype_code"]); info.bts.band_type = Convert.ToString(DataReader["band_type"]); info.bts.bts_cabinet_type = Convert.ToString(DataReader["bts_cabinet_type"]); info.bts.actual_config = Convert.ToString(DataReader["actual_config"]); info.bts.bandwidth = bandwidth; info.bts.license_power = license_power; info.bts.baseband_type = Convert.ToString(DataReader["baseband_type"]); info.bts.rru_type = Convert.ToString(DataReader["rru_type"]); info.bts.rru_power = rru_power; info.bts.rru_quantity = rru_quantity; info.bts.dcpdb_quantity = dcpdb_quantity; info.bts.dcpdb_type = Convert.ToString(DataReader["dcpdb_type"]); info.bts.antenna_gps = Convert.ToString(DataReader["antenna_gps"]); info.bts.bscrnc_name = Convert.ToString(DataReader["bscrnc_name"]); // EATP_Code add Harry (07/10/2020) info.bts.dcpdbpicture_near = Convert.ToString(DataReader["dcodbpicture_near"]); info.bts.dcpdbpicture_far = Convert.ToString(DataReader["dcodbpicture_far"]); info.bts.consumption_power = Convert.ToString(DataReader["consumption_power"]); // EATP_Code End Harry (07/10/2020) pathImage = (Path.Combine(ConfigurationManager.AppSettings["pathPhoto"], Convert.ToString(DataReader["workpackageid"]), Convert.ToString(GetBTSInfo_geoTag[2]))).Replace("/", "\\"); if (!string.IsNullOrEmpty(Convert.ToString(GetBTSInfo_geoTag[2])) && File.Exists(pathImage)) { info.bts.picture_near = GetStringBase64(pathImage); if (needCompress(info.bts.picture_near)) { info.bts.picture_near = GetStringBase64(createCompressedImage(pathImage)); } } else { info.bts.picture_near = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } if (!string.IsNullOrEmpty(Convert.ToString(GetBTSInfo_geoTag[2])) && File.Exists(pathImage)) { info.bts.picture_far = GetStringBase64(pathImage); if (needCompress(info.bts.picture_far)) { info.bts.picture_far = GetStringBase64(createCompressedImage(pathImage)); } } else { info.bts.picture_far = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["moduleList"]))) { info.module_bts = new List <moduleBTSInfo>(); string[] getModuleList = Convert.ToString(DataReader["modulelist"]).Split(','); for (int x = 0; x < getModuleList.Count(); x++) { moduleBTSInfo moduleDetail = new moduleBTSInfo(); string[] getDetailModuleList = getModuleList[x].Split('|'); moduleDetail.ddf_count = getDetailModuleList[0]; moduleDetail.ddf_type = getDetailModuleList[1]; moduleDetail.product_name = getDetailModuleList[3]; moduleDetail.product_sn = getDetailModuleList[5]; moduleDetail.product_code = getDetailModuleList[4]; moduleDetail.barcode = "not applicable"; moduleDetail.ref_id = Convert.ToInt32(getDetailModuleList[6]); pathImage = (Path.Combine(ConfigurationManager.AppSettings["pathPhoto"], Convert.ToString(DataReader["workpackageid"]), Convert.ToString(getModuleInf_geoTag[2]))).Replace("/", "\\"); if (!string.IsNullOrEmpty(Convert.ToString(getModuleInf_geoTag[2])) && File.Exists(pathImage)) { moduleDetail.picture_near = GetStringBase64(pathImage); if (needCompress(moduleDetail.picture_near)) { moduleDetail.picture_near = GetStringBase64(createCompressedImage(pathImage)); } } else { moduleDetail.picture_near = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } if (!string.IsNullOrEmpty(Convert.ToString(getModuleInf_geoTag[2])) && File.Exists(pathImage)) { moduleDetail.picture_far = GetStringBase64(pathImage); if (needCompress(moduleDetail.picture_far)) { moduleDetail.picture_far = GetStringBase64(createCompressedImage(pathImage)); } } else { moduleDetail.picture_far = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } info.module_bts.Add(moduleDetail); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["antennaList"]))) { info.antenna = new List <AntennaInfo>(); string[] getAntennaList = Convert.ToString(DataReader["antennaList"]).Split(','); for (int x = 0; x < getAntennaList.Count(); x++) { AntennaInfo antennaDetail = new AntennaInfo(); string[] getDetailAntennaList = getAntennaList[x].Split('|'); antennaDetail.product_code = Convert.ToString(getDetailAntennaList[0]); antennaDetail.antenna_heightsect = int.Parse(getDetailAntennaList[1]); antennaDetail.antenna_azimuthsect = int.Parse(getDetailAntennaList[2]); antennaDetail.antenna_tiltingsect = int.Parse(getDetailAntennaList[3]); antennaDetail.antenna_beamwidth = int.Parse(getDetailAntennaList[4]); antennaDetail.product_name = Convert.ToString(getDetailAntennaList[5]); antennaDetail.product_sn = Convert.ToString(getDetailAntennaList[6]); antennaDetail.ref_id = Convert.ToInt32(getDetailAntennaList[7]); antennaDetail.antenna_etilting = Convert.ToInt32(getDetailAntennaList[8]); antennaDetail.antenna_brand = Convert.ToString(getDetailAntennaList[9]); pathImage = (Path.Combine(ConfigurationManager.AppSettings["pathPhoto"], Convert.ToString(DataReader["workpackageid"]), Convert.ToString(getAntennaInf_geoTag[2]))).Replace("/", "\\"); if (!string.IsNullOrEmpty(Convert.ToString(getAntennaInf_geoTag[2])) && File.Exists(pathImage)) { antennaDetail.picture_near = GetStringBase64(pathImage); if (needCompress(antennaDetail.picture_near)) { antennaDetail.picture_near = GetStringBase64(createCompressedImage(pathImage)); } } else { antennaDetail.picture_near = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } if (!string.IsNullOrEmpty(Convert.ToString(getModuleInf_geoTag[2])) && File.Exists(pathImage)) { antennaDetail.picture_far = GetStringBase64(pathImage); if (needCompress(antennaDetail.picture_far)) { antennaDetail.picture_far = GetStringBase64(createCompressedImage(pathImage)); } } else { antennaDetail.picture_far = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } info.antenna.Add(antennaDetail); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["TRMConfigList"]))) { info.trm_config = new List <TRMConfigInfo>(); string[] getTRMConfig = Convert.ToString(DataReader["TRMConfigList"]).Split(';'); for (int x = 0; x < getTRMConfig.Count(); x++) { TRMConfigInfo TRMConfigDetail = new TRMConfigInfo(); string[] getTRMConfigDetail = getTRMConfig[x].Split('|'); TRMConfigDetail.ne_ipaddress = Convert.ToString(getTRMConfigDetail[0]); TRMConfigDetail.vlan_id = Convert.ToString(getTRMConfigDetail[1]); TRMConfigDetail.actual_bandwidth = Convert.ToString(getTRMConfigDetail[2]); info.trm_config.Add(TRMConfigDetail); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["radio_mw"]))) { info.radio_mw = new List <RadioMWInfo>(); string[] getradio_mw = Convert.ToString(DataReader["radio_mw"]).Split(';'); for (int x = 0; x < getradio_mw.Count(); x++) { RadioMWInfo radiomwinfo = new RadioMWInfo(); string[] getradio_mwdetail = getradio_mw[x].Split('|'); radiomwinfo.product_code = Convert.ToString(getradio_mwdetail[0]); radiomwinfo.product_name = Convert.ToString(getradio_mwdetail[1]); radiomwinfo.radiomw_brand = Convert.ToString(getradio_mwdetail[2]); radiomwinfo.radiomw_height = Convert.ToInt32(getradio_mwdetail[3]); radiomwinfo.product_sn = Convert.ToString(getradio_mwdetail[4]); radiomwinfo.picture_near = Convert.ToString(getradio_mwdetail[5]); radiomwinfo.picture_far = Convert.ToString(getradio_mwdetail[6]); radiomwinfo.ref_id = Convert.ToInt32(getradio_mwdetail[7]); radiomwinfo.trm_config = info.trm_config; info.radio_mw.Add(radiomwinfo); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["antenna_mw"]))) { info.antenna_mw = new List <AntennaMWInfo>(); string[] getantenna_mw = Convert.ToString(DataReader["antenna_mw"]).Split(';'); for (int x = 0; x < getantenna_mw.Count(); x++) { AntennaMWInfo antennamwinfo = new AntennaMWInfo(); string[] getantenna_mwdetail = getantenna_mw[x].Split('|'); antennamwinfo.product_code = Convert.ToString(getantenna_mwdetail[0]); antennamwinfo.product_name = Convert.ToString(getantenna_mwdetail[1]); antennamwinfo.antennamw_brand = Convert.ToString(getantenna_mwdetail[2]); antennamwinfo.antennamw_diameter = Convert.ToDecimal(getantenna_mwdetail[3]); antennamwinfo.antennamw_height = Convert.ToInt32(getantenna_mwdetail[4]); antennamwinfo.product_sn = Convert.ToString(getantenna_mwdetail[5]); antennamwinfo.leg_position = Convert.ToString(getantenna_mwdetail[6]); antennamwinfo.picture_near = Convert.ToString(getantenna_mwdetail[7]); antennamwinfo.picture_far = Convert.ToString(getantenna_mwdetail[8]); antennamwinfo.antennamw_azimuth = Convert.ToInt32(getantenna_mwdetail[9]); antennamwinfo.ref_id = Convert.ToInt32(getantenna_mwdetail[10]); antennamwinfo.radiomw = info.radio_mw; info.antenna_mw.Add(antennamwinfo); } } //if (!string.IsNullOrEmpty(Convert.ToString(DataReader["antenna_gps"]))) if (!string.IsNullOrEmpty(Convert.ToString(DataReader["antenna_gps_detail"]))) { string pathImageNear = string.Empty; string pathImageFar = string.Empty; info.antenna_gps = new List <AntennaGPSInfo>(); //string[] getantenna_gps = Convert.ToString(DataReader["antenna_gps"]).Split(';'); string[] getantenna_gps = Convert.ToString(DataReader["antenna_gps_detail"]).Split(';'); for (int x = 0; x < getantenna_gps.Count(); x++) { AntennaGPSInfo antennagpsinfo = new AntennaGPSInfo(); string[] getantenna_gpsdetail = getantenna_gps[x].Split('|'); antennagpsinfo.product_code = Convert.ToString(getantenna_gpsdetail[0]); antennagpsinfo.product_name = Convert.ToString(getantenna_gpsdetail[1]); antennagpsinfo.antennagps_brand = Convert.ToString(getantenna_gpsdetail[2]); antennagpsinfo.antennagps_height = Convert.ToInt32(getantenna_gpsdetail[3]); antennagpsinfo.product_sn = Convert.ToString(getantenna_gpsdetail[4]); //antennagpsinfo.picture_near = Convert.ToString(getantenna_gpsdetail[5]); //antennagpsinfo.picture_far = Convert.ToString(getantenna_gpsdetail[6]); antennagpsinfo.ref_id = Convert.ToInt32(getantenna_gpsdetail[7]); pathImageNear = (Path.Combine(ConfigurationManager.AppSettings["pathPhoto"], Convert.ToString(DataReader["workpackageid"]), Convert.ToString(getAntennaGPSInf_near_geoTag[2]))).Replace("/", "\\"); pathImageFar = (Path.Combine(ConfigurationManager.AppSettings["pathPhoto"], Convert.ToString(DataReader["workpackageid"]), Convert.ToString(getAntennaGPSInf_far_geoTag[2]))).Replace("/", "\\"); if (!string.IsNullOrEmpty(Convert.ToString(getAntennaGPSInf_near_geoTag[2])) && File.Exists(pathImageNear)) { antennagpsinfo.picture_near = GetStringBase64(pathImageNear); if (needCompress(antennagpsinfo.picture_near)) { antennagpsinfo.picture_near = GetStringBase64(createCompressedImage(pathImageNear)); } } else { antennagpsinfo.picture_near = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } if (!string.IsNullOrEmpty(Convert.ToString(getAntennaGPSInf_far_geoTag[2])) && File.Exists(pathImageFar)) { antennagpsinfo.picture_far = GetStringBase64(pathImageFar); if (needCompress(antennagpsinfo.picture_far)) { antennagpsinfo.picture_far = GetStringBase64(createCompressedImage(pathImageFar)); } } else { antennagpsinfo.picture_far = GetStringBase64(ConfigurationManager.AppSettings["pathNA"]); } info.antenna_gps.Add(antennagpsinfo); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["module_mw"]))) { info.module_mw = new List <ModuleMWInfo>(); string[] getmodule_mw = Convert.ToString(DataReader["module_mw"]).Split(';'); for (int x = 0; x < getmodule_mw.Count(); x++) { ModuleMWInfo moduleinfoinfo = new ModuleMWInfo(); string[] getmodule_mwdetail = getmodule_mw[x].Split('|'); moduleinfoinfo.product_code = Convert.ToString(getmodule_mwdetail[0]); moduleinfoinfo.product_name = Convert.ToString(getmodule_mwdetail[1]); moduleinfoinfo.modulemw_brand = Convert.ToString(getmodule_mwdetail[2]); moduleinfoinfo.product_sn = Convert.ToString(getmodule_mwdetail[3]); moduleinfoinfo.picture_near = Convert.ToString(getmodule_mwdetail[4]); moduleinfoinfo.picture_far = Convert.ToString(getmodule_mwdetail[5]); moduleinfoinfo.ref_id = Convert.ToInt32(getmodule_mwdetail[6]); info.module_mw.Add(moduleinfoinfo); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["rfu"]))) { info.rfu = new List <RFUInfo>(); string[] getrfu = Convert.ToString(DataReader["rfu"]).Split(';'); for (int x = 0; x < getrfu.Count(); x++) { RFUInfo rfuinfo = new RFUInfo(); string[] getrfudetail = getrfu[x].Split('|'); rfuinfo.product_code = Convert.ToString(getrfudetail[0]); rfuinfo.product_name = Convert.ToString(getrfudetail[1]); rfuinfo.rfu_brand = Convert.ToString(getrfudetail[2]); rfuinfo.product_sn = Convert.ToString(getrfudetail[3]); rfuinfo.picture_near = Convert.ToString(getrfudetail[4]); rfuinfo.picture_far = Convert.ToString(getrfudetail[5]); rfuinfo.rfu_height = Convert.ToInt32(getrfudetail[6]); rfuinfo.leg_position = Convert.ToString(getrfudetail[7]); rfuinfo.rfu_location = Convert.ToString(getrfudetail[8]); rfuinfo.ref_id = Convert.ToInt32(getrfudetail[9]); rfuinfo.rru_power = Convert.ToInt32(getrfudetail[10]); rfuinfo.rru_quantity = Convert.ToInt32(getrfudetail[11]); info.rfu.Add(rfuinfo); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["other_module"]))) { info.other_module = new List <OtherModuleInfo>(); string[] getothermodule = Convert.ToString(DataReader["other_module"]).Split(';'); for (int x = 0; x < getothermodule.Count(); x++) { OtherModuleInfo othermoduleinfo = new OtherModuleInfo(); string[] getothermoduledetail = getothermodule[x].Split('|'); othermoduleinfo.product_code = Convert.ToString(getothermodule[0]); othermoduleinfo.product_name = Convert.ToString(getothermodule[1]); othermoduleinfo.product_brand = Convert.ToString(getothermodule[2]); othermoduleinfo.product_sn = Convert.ToString(getothermodule[3]); othermoduleinfo.picture_near = Convert.ToString(getothermodule[4]); othermoduleinfo.picture_far = Convert.ToString(getothermodule[5]); othermoduleinfo.ref_id = Convert.ToInt32(getothermodule[6]); info.other_module.Add(othermoduleinfo); } } // EATP_Code add Harry (07/10/2020) if (!string.IsNullOrEmpty(Convert.ToString(DataReader["module_combiner"]))) { info.module_combiner = new List <ModuleCombinerInfo>(); string[] getmodulecombiner = Convert.ToString(DataReader["module_combiner"]).Split(';'); for (int x = 0; x < getmodulecombiner.Count(); x++) { ModuleCombinerInfo modulecombinerinfo = new ModuleCombinerInfo(); string[] getmodulecombinerdetail = getmodulecombiner[x].Split('|'); modulecombinerinfo.product_code = Convert.ToString(getmodulecombiner[0]); modulecombinerinfo.product_name = Convert.ToString(getmodulecombiner[1]); modulecombinerinfo.product_brand = Convert.ToString(getmodulecombiner[2]); modulecombinerinfo.product_sn = Convert.ToString(getmodulecombiner[3]); modulecombinerinfo.picture_near = Convert.ToString(getmodulecombiner[4]); modulecombinerinfo.picture_far = Convert.ToString(getmodulecombiner[5]); modulecombinerinfo.ref_id = Convert.ToInt32(getmodulecombiner[6]); info.module_combiner.Add(modulecombinerinfo); } } if (!string.IsNullOrEmpty(Convert.ToString(DataReader["module_bbu"]))) { info.module_bbu = new List <ModuleBBUInfo>(); string[] getmodulebbu = Convert.ToString(DataReader["module_bbu"]).Split(';'); for (int x = 0; x < getmodulebbu.Count(); x++) { ModuleBBUInfo modulebbuinfo = new ModuleBBUInfo(); string[] getmodulebbudetail = getmodulebbu[x].Split('|'); modulebbuinfo.slot_number = Convert.ToString(getmodulebbu[0]); modulebbuinfo.module_code = Convert.ToString(getmodulebbu[1]); modulebbuinfo.module_name = Convert.ToString(getmodulebbu[2]); modulebbuinfo.module_brand = Convert.ToString(getmodulebbu[3]); modulebbuinfo.module_sn = Convert.ToString(getmodulebbu[4]); modulebbuinfo.picture_near = Convert.ToString(getmodulebbu[5]); modulebbuinfo.picture_far = Convert.ToString(getmodulebbu[6]); modulebbuinfo.ref_id = Convert.ToInt32(getmodulebbu[7]); modulebbuinfo.available_slot = Convert.ToString(getmodulebbu[8]); modulebbuinfo.consumption_power = Convert.ToString(getmodulebbu[9]); info.module_bbu.Add(modulebbuinfo); } } // EATP_Code end Harry (07/10/2020) } } else { info = null; } } catch (Exception ex) { Console.WriteLine("Error GetSitelist " + dbconfigscope + ": " + ex.Message.ToString()); info = null; } finally { GetConnectionType(dbconfigscope).Close(); } return(info); }