/// <summary> /// Process street light using GPS Coordinates(Structure is Yes). /// </summary> /// <param name="p_xlTable">Excel data as datatbale</param> /// <param name="i"></param> private DataRow StreetLightESILocationSY(DataRow p_xlRow) { StreetLightImportUtility streetLightImportUtility = new StreetLightImportUtility(m_gTDataContext, false, m_gTTransactionManager, m_gTApplication); try { if (!string.IsNullOrEmpty(Convert.ToString(p_xlRow["LAMP TYPE"])) && !string.IsNullOrEmpty(Convert.ToString(p_xlRow["WATTAGE"])) && !string.IsNullOrEmpty(Convert.ToString(p_xlRow["LUMINAIRE STYLE"]))) { streetLightImportUtility.m_strLampType = Convert.ToString(p_xlRow["LAMP TYPE"]); streetLightImportUtility.m_strLumiStyle = Convert.ToString(p_xlRow["LUMINAIRE STYLE"]); streetLightImportUtility.m_strWattage = Convert.ToString(p_xlRow["WATTAGE"]); } int MiscellaneousStructureFID = streetLightImportUtility.GetMiscStructureFID(Convert.ToString(p_xlRow["ESI LOCATION"])); if (MiscellaneousStructureFID != 0) { streetLightImportUtility.CreateStreetLightWithAccountStructure(MiscellaneousStructureFID); if (string.IsNullOrEmpty(streetLightImportUtility.m_strStatus)) { p_xlRow["TRANSACTION STATUS"] = "WARNING"; p_xlRow["TRANSACTION COMMENT"] = "Structure ID not found and no GPS given. Placed non-located Street Light at location of account’s structure."; } else { p_xlRow["TRANSACTION STATUS"] = streetLightImportUtility.m_strStatus; p_xlRow["TRANSACTION COMMENT"] = streetLightImportUtility.m_strComment; } } else { streetLightImportUtility.CreateStreetLightWithAccountBoundary(Convert.ToString(p_xlRow["ESI LOCATION"])); if (string.IsNullOrEmpty(streetLightImportUtility.m_strStatus)) { p_xlRow["TRANSACTION STATUS"] = "WARNING"; p_xlRow["TRANSACTION COMMENT"] = "Structure ID not found and no GPS. Placed non-located Street Light at centroid of account boundary."; } else { p_xlRow["TRANSACTION STATUS"] = streetLightImportUtility.m_strStatus; p_xlRow["TRANSACTION COMMENT"] = streetLightImportUtility.m_strComment; } } } catch { throw; } return(p_xlRow); }
/// <summary> /// Process street light using ESI Location(Structure is No). /// </summary> /// <param name="p_xlTable">Excel data as datatbale</param> /// <param name="streetLightImportUtility">ImportUtility class object</param> /// <param name="i"></param> private DataRow StreetLightESILocationSN(DataRow p_xlRow, StreetLightImportUtility streetLightImportUtility) { try { AddCuAttributes(p_xlRow, streetLightImportUtility); int MiscellaneousStructureFID = streetLightImportUtility.GetMiscStructureFID(Convert.ToString(p_xlRow["ESI LOCATION"])); if (MiscellaneousStructureFID != 0) { streetLightImportUtility.CreateStreetLightWithAccountStructure(MiscellaneousStructureFID); if (string.IsNullOrEmpty(streetLightImportUtility.m_strStatus)) { p_xlRow["TRANSACTION STATUS"] = "WARNING"; p_xlRow["TRANSACTION COMMENT"] = "No Structure or GPS given. Placed non-located Street Light at location of account’s structure."; } else { p_xlRow["TRANSACTION STATUS"] = streetLightImportUtility.m_strStatus; p_xlRow["TRANSACTION COMMENT"] = streetLightImportUtility.m_strComment; } } else { streetLightImportUtility.CreateStreetLightWithAccountBoundary(Convert.ToString(p_xlRow["ESI LOCATION"])); if (string.IsNullOrEmpty(streetLightImportUtility.m_strStatus)) { p_xlRow["TRANSACTION STATUS"] = "WARNING"; p_xlRow["TRANSACTION COMMENT"] = "No Structure or GPS given. Placed non-located Street Light at centroid of account boundary."; } else { p_xlRow["TRANSACTION STATUS"] = streetLightImportUtility.m_strStatus; p_xlRow["TRANSACTION COMMENT"] = streetLightImportUtility.m_strComment; } } } catch { throw; } return(p_xlRow); }