Esempio n. 1
0
        /// <summary>
        /// Convert a nettiers entity to the ws proxy entity.
        /// </summary>
        public static WsProxy.StudentMasterIndex Convert(Nettiers.AdventureWorks.Entities.StudentMasterIndex item)
        {
            WsProxy.StudentMasterIndex outItem = new WsProxy.StudentMasterIndex();
            outItem.StudentId         = item.StudentId;
            outItem.EpassId           = item.EpassId;
            outItem.StudentUpn        = item.StudentUpn;
            outItem.SsabsaId          = item.SsabsaId;
            outItem.Surname           = item.Surname;
            outItem.FirstName         = item.FirstName;
            outItem.OtherNames        = item.OtherNames;
            outItem.KnownName         = item.KnownName;
            outItem.LegalName         = item.LegalName;
            outItem.Dob               = item.Dob;
            outItem.Gender            = item.Gender;
            outItem.IndigeneousStatus = item.IndigeneousStatus;
            outItem.Lbote             = item.Lbote;
            outItem.EslPhase          = item.EslPhase;
            outItem.TribalGroup       = item.TribalGroup;
            outItem.SlpCreatedFlag    = item.SlpCreatedFlag;
            outItem.AddressLine1      = item.AddressLine1;
            outItem.AddressLine2      = item.AddressLine2;
            outItem.AddressLine3      = item.AddressLine3;
            outItem.AddressLine4      = item.AddressLine4;
            outItem.Suburb            = item.Suburb;
            outItem.Postcode          = item.Postcode;
            outItem.Phone1            = item.Phone1;
            outItem.Phone2            = item.Phone2;
            outItem.SourceSystem      = item.SourceSystem;
            outItem.PhoneticMatchId   = item.PhoneticMatchId;

            outItem.OriginalStudentId = item.OriginalStudentId;

            return(outItem);
        }
Esempio n. 2
0
        /// <summary>
        /// Convert a collection from  to a nettiers collection to a the ws proxy collection.
        /// </summary>
        public static WsProxy.StudentMasterIndex[] Convert(Nettiers.AdventureWorks.Entities.TList <StudentMasterIndex> items)
        {
            WsProxy.StudentMasterIndex[] outItems = new WsProxy.StudentMasterIndex[items.Count];
            int count = 0;

            foreach (Nettiers.AdventureWorks.Entities.StudentMasterIndex item in items)
            {
                outItems[count++] = Convert(item);
            }
            return(outItems);
        }
Esempio n. 3
0
        /// <summary>
        ///     Gets rows from the datasource based on the PK_STUDENT_MASTER_INDEX index.
        /// </summary>
        /// <param name="start">Row number at which to start reading.</param>
        /// <param name="pageLength">Number of rows to return.</param>
        /// <param name="_studentId"></param>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="count">out parameter to get total records for query</param>
        /// <remarks></remarks>
        /// <returns>Returns an instance of the <see cref="Nettiers.AdventureWorks.Entities.StudentMasterIndex"/> class.</returns>
        public override Nettiers.AdventureWorks.Entities.StudentMasterIndex GetByStudentId(TransactionManager transactionManager, System.Int32 _studentId, int start, int pageLength, out int count)
        {
            try
            {
                WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
                proxy.Url = Url;
                WsProxy.StudentMasterIndex items = proxy.StudentMasterIndexProvider_GetByStudentId(_studentId, start, pageLength, out count);

                return(Convert(items));
            }
            catch (SoapException soex)
            {
                System.Diagnostics.Debug.WriteLine(soex);
                throw soex;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                throw ex;
            }
        }
Esempio n. 4
0
        /// <summary>
        ///     Inserts a Nettiers.AdventureWorks.Entities.StudentMasterIndex object into the datasource using a transaction.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="entity">Nettiers.AdventureWorks.Entities.StudentMasterIndex object to insert.</param>
        /// <remarks></remarks>
        /// <returns>Returns true if operation is successful.</returns>
        public override bool Insert(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.StudentMasterIndex entity)
        {
            WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
            proxy.Url = Url;

            try
            {
                WsProxy.StudentMasterIndex result = proxy.StudentMasterIndexProvider_Insert(Convert(entity));
                Convert(entity, result);
                return(true);
            }
            catch (SoapException soex)
            {
                System.Diagnostics.Debug.WriteLine(soex);
                throw soex;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                throw ex;
            }
        }
Esempio n. 5
0
 /// <summary>
 /// Convert a nettiers collection to the ws proxy collection.
 /// </summary>
 public static Nettiers.AdventureWorks.Entities.StudentMasterIndex Convert(WsProxy.StudentMasterIndex item)
 {
     Nettiers.AdventureWorks.Entities.StudentMasterIndex outItem = item == null ? null : new Nettiers.AdventureWorks.Entities.StudentMasterIndex();
     Convert(outItem, item);
     return(outItem);
 }
		/// <summary>
		/// Convert a collection from  to a nettiers collection to a the ws proxy collection.
		/// </summary>
		public static WsProxy.StudentMasterIndex[] Convert(Nettiers.AdventureWorks.Entities.TList<StudentMasterIndex> items)
		{
			WsProxy.StudentMasterIndex[] outItems = new WsProxy.StudentMasterIndex[items.Count];
			int count = 0;
		
			foreach (Nettiers.AdventureWorks.Entities.StudentMasterIndex item in items)
			{
				outItems[count++] = Convert(item);
			}
			return outItems;
		}
		/// <summary>
		/// Convert a nettiers entity to the ws proxy entity.
		/// </summary>
		public static WsProxy.StudentMasterIndex Convert(Nettiers.AdventureWorks.Entities.StudentMasterIndex item)
		{			
			WsProxy.StudentMasterIndex outItem = new WsProxy.StudentMasterIndex();			
			outItem.StudentId = item.StudentId;
			outItem.EpassId = item.EpassId;
			outItem.StudentUpn = item.StudentUpn;
			outItem.SsabsaId = item.SsabsaId;
			outItem.Surname = item.Surname;
			outItem.FirstName = item.FirstName;
			outItem.OtherNames = item.OtherNames;
			outItem.KnownName = item.KnownName;
			outItem.LegalName = item.LegalName;
			outItem.Dob = item.Dob;
			outItem.Gender = item.Gender;
			outItem.IndigeneousStatus = item.IndigeneousStatus;
			outItem.Lbote = item.Lbote;
			outItem.EslPhase = item.EslPhase;
			outItem.TribalGroup = item.TribalGroup;
			outItem.SlpCreatedFlag = item.SlpCreatedFlag;
			outItem.AddressLine1 = item.AddressLine1;
			outItem.AddressLine2 = item.AddressLine2;
			outItem.AddressLine3 = item.AddressLine3;
			outItem.AddressLine4 = item.AddressLine4;
			outItem.Suburb = item.Suburb;
			outItem.Postcode = item.Postcode;
			outItem.Phone1 = item.Phone1;
			outItem.Phone2 = item.Phone2;
			outItem.SourceSystem = item.SourceSystem;
			outItem.PhoneticMatchId = item.PhoneticMatchId;

			outItem.OriginalStudentId = item.OriginalStudentId;
							
			return outItem;
		}