Beispiel #1
0
        /// <summary>
        /// Creates a new instance of the sol_Payments class and populates it with data from the specified SqlDataReader.
        /// </summary>
        protected virtual Sol_Payment MakeSol_Payment(SqlDataReader dataReader)
        {
            Sol_Payment sol_Payment = new Sol_Payment();

            sol_Payment.PaymentID     = SqlClientUtility.GetInt32(dataReader, "PaymentID", 0);
            sol_Payment.PaymentAmount = SqlClientUtility.GetFloat(dataReader, "PaymentAmount", 0.0F);
            sol_Payment.Date          = SqlClientUtility.GetDateTime(dataReader, "date", new DateTime(0));
            sol_Payment.UserID        = SqlClientUtility.GetInt32(dataReader, "UserID", 0);
            sol_Payment.UserName      = SqlClientUtility.GetString(dataReader, "UserName", String.Empty);
            sol_Payment.CustomerID    = SqlClientUtility.GetInt32(dataReader, "CustomerID", 0);
            sol_Payment.ChequeNumber  = SqlClientUtility.GetString(dataReader, "ChequeNumber", String.Empty);
            sol_Payment.Name          = SqlClientUtility.GetString(dataReader, "Name", String.Empty);
            sol_Payment.Address1      = SqlClientUtility.GetString(dataReader, "Address1", String.Empty);
            sol_Payment.Address2      = SqlClientUtility.GetString(dataReader, "Address2", String.Empty);
            sol_Payment.City          = SqlClientUtility.GetString(dataReader, "City", String.Empty);
            sol_Payment.Province      = SqlClientUtility.GetString(dataReader, "Province", String.Empty);
            sol_Payment.Country       = SqlClientUtility.GetString(dataReader, "Country", String.Empty);
            sol_Payment.PostalCode    = SqlClientUtility.GetString(dataReader, "PostalCode", String.Empty);

            return(sol_Payment);
        }