private tabelkapokaz sprawdzaj_wartosci_i_dodaj(Tabelka_plan elem_2) { tabelkapokaz elem_1 = new tabelkapokaz(); elem_1.RIFU_NR = "Rifu XXX"; elem_1.RIFU = elem_2.Diameter; elem_1.RICHTUNG = elem_2.Azimuth; elem_1.FREQUENZ = elem_2.Frequenz; elem_1.GEGENSTELLE = elem_2.NE_B; elem_1.Linknummer = elem_2.USER_LINK_ID; elem_1.ODU_ANZAHL = elem_2.Ile_odu; return(elem_1); }
private tabelkapokaz sprawdzaj_wartosci(tabelkapokaz elem, Tabelka_plan elem_2) { tabelkapokaz elem_1 = elem; //srednica int e1 = -1; int e2 = -1; string tmp1 = ""; if (!string.IsNullOrEmpty(elem_1.RIFU)) { tmp1 = elem_1.RIFU.Replace(",", "."); } { try { e1 = Convert.ToInt32(tmp1); e2 = Convert.ToInt32(elem_2.Diameter); if (e1 != e2) { elem_1.RIFU = elem_2.Diameter; } } catch (Exception) { throw; } } //czestotliwosc if (elem_1.FREQUENZ != elem_2.Frequenz) { elem_1.FREQUENZ = elem_2.Frequenz; } //azymut if (!string.IsNullOrEmpty(elem_2.Azimuth)) { if (!string.IsNullOrEmpty(elem_1.RIFU) && (Convert.ToDouble(elem_1.RICHTUNG.Replace(",", ".")) != Convert.ToDouble(elem_2.Azimuth.Replace(",", ".")))) { elem_1.RICHTUNG = Convert.ToInt32(elem_2.Azimuth.Replace(",", ".")).ToString(); } } //Gegenstelle if (elem_1.GEGENSTELLE != elem_2.NE_B) { elem_1.GEGENSTELLE = elem_2.NE_B; } //link if (elem_1.Linknummer != elem_2.USER_LINK_ID) { elem_1.Linknummer = elem_2.USER_LINK_ID; } //odu if (elem_1.ODU_ANZAHL != elem_2.Ile_odu || elem_2.Ile_odu == "2") { elem_1.ODU_ANZAHL = elem_2.Ile_odu; } return(elem_1); }