/// <summary> /// Process street light using Structure Id.(Structure is Yes). /// </summary> /// <param name="p_xlTable">Excel data as datatbale</param> /// <param name="i"></param> private DataRow StreetLightStructureIDSY(DataRow p_xlRow) { StreetLightImportUtility streetLightImportUtility = new StreetLightImportUtility(m_gTDataContext, true, m_gTTransactionManager, m_gTApplication); try { AddCuAttributes(p_xlRow, streetLightImportUtility); streetLightImportUtility.CreateStreetLight(Convert.ToString(p_xlRow["ONCOR STRUCTURE ID"])); if (string.IsNullOrEmpty(streetLightImportUtility.m_strStatus)) { p_xlRow["TRANSACTION STATUS"] = "SUCCESS"; p_xlRow["TRANSACTION COMMENT"] = ""; } 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 GPS Coordinates(Structure is No). /// </summary> /// <param name="p_xlTable">Excel data as datatbale</param> /// <param name="i"></param> private DataRow StreetLightGPSSN(DataRow p_xlRow) { StreetLightImportUtility streetLightImportUtility = new StreetLightImportUtility(m_gTDataContext, true, m_gTTransactionManager, m_gTApplication); try { AddCuAttributes(p_xlRow, streetLightImportUtility); string gpsx = Regex.Replace(Convert.ToString(p_xlRow["GPS X"]), "[A-Za-z ]", ""); double gpsdx = double.Parse(gpsx.Trim()); string gpsy = Regex.Replace(Convert.ToString(p_xlRow["GPS Y"]), "[A-Za-z ]", ""); double gpsdy = double.Parse(gpsy.Trim()); double dZoord = 0.0; ConvertToLatitudeAndLongitude(ref gpsdx, ref gpsdy, ref dZoord); streetLightImportUtility.CreateStreetLight(gpsdx, gpsdy); if (string.IsNullOrEmpty(streetLightImportUtility.m_strStatus)) { p_xlRow["TRANSACTION STATUS"] = "SUCCESS"; p_xlRow["TRANSACTION COMMENT"] = ""; } else { p_xlRow["TRANSACTION STATUS"] = streetLightImportUtility.m_strStatus; p_xlRow["TRANSACTION COMMENT"] = streetLightImportUtility.m_strComment; } } catch { throw; } return(p_xlRow); }