/// <summary> /// Returns all contact regardless of customer. /// </summary> /// <param name="postcode">Code for selektion on contacts with specific position</param> /// <returns>CustomerDef[]</returns> public ContactsDef[] getContacts(string postcode) { ArrayList al = new ArrayList(); ContactsDef cdf = new ContactsDef(); int i = 0; if (mAllContacts == null) { mI2H.Find("M22"); mI2H.Next(); while (ECS.noNULL(mI2H_DEL.Value).Equals("M") && ECS.noNULL(mI2H_LAY.Value).Equals("22") && !mI2H.Eof) { lastContactKey = mI2H_HN1.Value + mI2H_HN2.Value + mI2H_HN3.Value; mI2R.Find(lastContactKey + " 0" + " 1"); mI2R.Next(); i++; while ((lastContactKey == (mI2R_HN1.Value + mI2R_HN2.Value + mI2R_HN3.Value)) && (!mI2R.Eof)) { if (CON_BEF.Trim().Equals("X")) { cdf.Name = CON_NAM; cdf.CustomerNo = ECS.noNULL(mI2H_NYC.Value); al.Add(cdf); } mI2R.Next(); } mI2H.Next(); } mAllContacts = (ContactsDef[])al.ToArray(typeof(ContactsDef)); return mAllContacts; } else return mAllContacts; }
public ContactsDef[] getContacts(string customerNo, string postcode) { ArrayList al = new ArrayList(); ContactsDef cdf = new ContactsDef(); if (mI2H.Find("M22" + customerNo)) { lastContactKey = mI2H_HN1.Value + mI2H_HN2.Value + mI2H_HN3.Value; mI2R.Find(lastContactKey + " 0" + " 1"); mI2R.Next(); while ((lastContactKey == (mI2R_HN1.Value + mI2R_HN2.Value + mI2R_HN3.Value)) && (!mI2R.Eof)) { if (CON_BEF.Trim().Equals("X")) { cdf.Name = CON_NAM; cdf.CustomerNo = ECS.noNULL(mI2H_NYC.Value); al.Add(cdf); } mI2R.Next(); } mI2H.Next(); } return (ContactsDef[])al.ToArray(typeof(ContactsDef)); }