Beispiel #1
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class BDCustomerAccount in the form of object of BDCustomerAccountCollection </returns>
        public BDCustomerAccountCollection SelectAll()
        {
            BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();

            foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAll())
            {
                _bDCustomerAccountWCF = new BDCustomerAccount();

                _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
                _bDCustomerAccountWCF.CustomerID            = _bDCustomerAccount.CustomerID;
                _bDCustomerAccountWCF.SalesInvoiceId        = _bDCustomerAccount.SalesInvoiceId;
                _bDCustomerAccountWCF.SalesDate             = _bDCustomerAccount.SalesDate;
                _bDCustomerAccountWCF.InvoiceNumber         = _bDCustomerAccount.InvoiceNumber;
                _bDCustomerAccountWCF.TotalPrice            = _bDCustomerAccount.TotalPrice;
                _bDCustomerAccountWCF.PaidAmount            = _bDCustomerAccount.PaidAmount;
                _bDCustomerAccountWCF.RemainingAmount       = _bDCustomerAccount.RemainingAmount;
                _bDCustomerAccountWCF.IsVoid      = _bDCustomerAccount.IsVoid;
                _bDCustomerAccountWCF.CreatedBy   = _bDCustomerAccount.CreatedBy;
                _bDCustomerAccountWCF.CreateDate  = _bDCustomerAccount.CreateDate;
                _bDCustomerAccountWCF.UpdatedBy   = _bDCustomerAccount.UpdatedBy;
                _bDCustomerAccountWCF.UpdateDate  = _bDCustomerAccount.UpdateDate;
                _bDCustomerAccountWCF.IsDeleted   = _bDCustomerAccount.IsDeleted;
                _bDCustomerAccountWCF.DeletedBy   = _bDCustomerAccount.DeletedBy;
                _bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate;
                _bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType;

                bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
            }
            return(bDCustomerAccountCollection);
        }
Beispiel #2
0
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// along with the details of the child table.
        /// </summary>
        ///
        /// <param name="pk" type="SALSalesHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        ///
        /// <returns>object of class BDCustomerAccountCollection</returns>
        public BDCustomerAccountCollection SelectAllByForeignKeySalesInvoiceIdPaged(SALSalesHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
        {
            BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();

            foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAllByForeignKeySalesInvoiceIdPaged(new POS.DataLayer.SALSalesHeaderPrimaryKey(pk.SalesHeaderID), pageSize, skipPages, orderByStatement))
            {
                _bDCustomerAccountWCF = new BDCustomerAccount();
                _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
                _bDCustomerAccountWCF.CustomerID            = _bDCustomerAccount.CustomerID;
                _bDCustomerAccountWCF.SalesInvoiceId        = _bDCustomerAccount.SalesInvoiceId;
                _bDCustomerAccountWCF.SalesDate             = _bDCustomerAccount.SalesDate;
                _bDCustomerAccountWCF.InvoiceNumber         = _bDCustomerAccount.InvoiceNumber;
                _bDCustomerAccountWCF.TotalPrice            = _bDCustomerAccount.TotalPrice;
                _bDCustomerAccountWCF.PaidAmount            = _bDCustomerAccount.PaidAmount;
                _bDCustomerAccountWCF.RemainingAmount       = _bDCustomerAccount.RemainingAmount;
                _bDCustomerAccountWCF.IsVoid      = _bDCustomerAccount.IsVoid;
                _bDCustomerAccountWCF.CreatedBy   = _bDCustomerAccount.CreatedBy;
                _bDCustomerAccountWCF.CreateDate  = _bDCustomerAccount.CreateDate;
                _bDCustomerAccountWCF.UpdatedBy   = _bDCustomerAccount.UpdatedBy;
                _bDCustomerAccountWCF.UpdateDate  = _bDCustomerAccount.UpdateDate;
                _bDCustomerAccountWCF.IsDeleted   = _bDCustomerAccount.IsDeleted;
                _bDCustomerAccountWCF.DeletedBy   = _bDCustomerAccount.DeletedBy;
                _bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate;
                _bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType;

                bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
            }
            return(bDCustomerAccountCollection);
        }
Beispiel #3
0
        /// <summary>
        /// This method will return a list of objects representing the specified number of entries from the specified record number in the table
        /// using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class BDCustomerAccount</param>
        /// <param name="fieldValue" type="object">Value for the field specified.</param>
        /// <param name="fieldValue2" type="object">Value for the field specified.</param>
        /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        ///
        /// <returns>List of object of class BDCustomerAccount in the form of an object of class BDCustomerAccountCollection</returns>
        public BDCustomerAccountCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();

            foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _bDCustomerAccountWCF = new BDCustomerAccount();

                _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
                _bDCustomerAccountWCF.CustomerID            = _bDCustomerAccount.CustomerID;
                _bDCustomerAccountWCF.SalesInvoiceId        = _bDCustomerAccount.SalesInvoiceId;
                _bDCustomerAccountWCF.SalesDate             = _bDCustomerAccount.SalesDate;
                _bDCustomerAccountWCF.InvoiceNumber         = _bDCustomerAccount.InvoiceNumber;
                _bDCustomerAccountWCF.TotalPrice            = _bDCustomerAccount.TotalPrice;
                _bDCustomerAccountWCF.PaidAmount            = _bDCustomerAccount.PaidAmount;
                _bDCustomerAccountWCF.RemainingAmount       = _bDCustomerAccount.RemainingAmount;
                _bDCustomerAccountWCF.IsVoid      = _bDCustomerAccount.IsVoid;
                _bDCustomerAccountWCF.CreatedBy   = _bDCustomerAccount.CreatedBy;
                _bDCustomerAccountWCF.CreateDate  = _bDCustomerAccount.CreateDate;
                _bDCustomerAccountWCF.UpdatedBy   = _bDCustomerAccount.UpdatedBy;
                _bDCustomerAccountWCF.UpdateDate  = _bDCustomerAccount.UpdateDate;
                _bDCustomerAccountWCF.IsDeleted   = _bDCustomerAccount.IsDeleted;
                _bDCustomerAccountWCF.DeletedBy   = _bDCustomerAccount.DeletedBy;
                _bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate;
                _bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType;

                bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
            }
            return(bDCustomerAccountCollection);
        }
Beispiel #4
0
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// along with the details of the child table.
        /// </summary>
        ///
        /// <param name="pk" type="SALSalesHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class BDCustomerAccountCollection</returns>
        public BDCustomerAccountCollection SelectAllByForeignKeySalesInvoiceId(SALSalesHeaderPrimaryKey pk)
        {
            BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();

            foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAllByForeignKeySalesInvoiceId(new POS.DataLayer.SALSalesHeaderPrimaryKey(pk.SalesHeaderID)))
            {
                _bDCustomerAccountWCF = new BDCustomerAccount();
                _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
                _bDCustomerAccountWCF.CustomerID            = _bDCustomerAccount.CustomerID;
                _bDCustomerAccountWCF.SalesInvoiceId        = _bDCustomerAccount.SalesInvoiceId;
                _bDCustomerAccountWCF.SalesDate             = _bDCustomerAccount.SalesDate;
                _bDCustomerAccountWCF.InvoiceNumber         = _bDCustomerAccount.InvoiceNumber;
                _bDCustomerAccountWCF.TotalPrice            = _bDCustomerAccount.TotalPrice;
                _bDCustomerAccountWCF.PaidAmount            = _bDCustomerAccount.PaidAmount;
                _bDCustomerAccountWCF.RemainingAmount       = _bDCustomerAccount.RemainingAmount;
                _bDCustomerAccountWCF.IsVoid       = _bDCustomerAccount.IsVoid;
                _bDCustomerAccountWCF.CreatedBy    = _bDCustomerAccount.CreatedBy;
                _bDCustomerAccountWCF.CreateDate   = _bDCustomerAccount.CreateDate;
                _bDCustomerAccountWCF.UpdatedBy    = _bDCustomerAccount.UpdatedBy;
                _bDCustomerAccountWCF.UpdateDate   = _bDCustomerAccount.UpdateDate;
                _bDCustomerAccountWCF.IsDeleted    = _bDCustomerAccount.IsDeleted;
                _bDCustomerAccountWCF.DeletedBy    = _bDCustomerAccount.DeletedBy;
                _bDCustomerAccountWCF.DeletedDate  = _bDCustomerAccount.DeletedDate;
                _bDCustomerAccountWCF.Depit        = _bDCustomerAccount.Depit;
                _bDCustomerAccountWCF.Credit       = _bDCustomerAccount.Credit;
                _bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber;
                _bDCustomerAccountWCF.InvoiceType  = _bDCustomerAccount.InvoiceType;
                _bDCustomerAccountWCF.LstDayToPay  = _bDCustomerAccount.LstDayToPay;

                bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
            }
            return(bDCustomerAccountCollection);
        }
Beispiel #5
0
        /// <summary>
        /// This method will return a list of objects representing the specified number of entries from the specified record number in the table.
        /// </summary>
        ///
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        ///
        /// <returns>list of objects of class BDCustomerAccount in the form of an object of class BDCustomerAccountCollection </returns>
        public BDCustomerAccountCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();

            foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _bDCustomerAccountWCF = new BDCustomerAccount();

                _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
                _bDCustomerAccountWCF.CustomerID            = _bDCustomerAccount.CustomerID;
                _bDCustomerAccountWCF.SalesInvoiceId        = _bDCustomerAccount.SalesInvoiceId;
                _bDCustomerAccountWCF.SalesDate             = _bDCustomerAccount.SalesDate;
                _bDCustomerAccountWCF.InvoiceNumber         = _bDCustomerAccount.InvoiceNumber;
                _bDCustomerAccountWCF.TotalPrice            = _bDCustomerAccount.TotalPrice;
                _bDCustomerAccountWCF.PaidAmount            = _bDCustomerAccount.PaidAmount;
                _bDCustomerAccountWCF.RemainingAmount       = _bDCustomerAccount.RemainingAmount;
                _bDCustomerAccountWCF.IsVoid       = _bDCustomerAccount.IsVoid;
                _bDCustomerAccountWCF.CreatedBy    = _bDCustomerAccount.CreatedBy;
                _bDCustomerAccountWCF.CreateDate   = _bDCustomerAccount.CreateDate;
                _bDCustomerAccountWCF.UpdatedBy    = _bDCustomerAccount.UpdatedBy;
                _bDCustomerAccountWCF.UpdateDate   = _bDCustomerAccount.UpdateDate;
                _bDCustomerAccountWCF.IsDeleted    = _bDCustomerAccount.IsDeleted;
                _bDCustomerAccountWCF.DeletedBy    = _bDCustomerAccount.DeletedBy;
                _bDCustomerAccountWCF.DeletedDate  = _bDCustomerAccount.DeletedDate;
                _bDCustomerAccountWCF.Depit        = _bDCustomerAccount.Depit;
                _bDCustomerAccountWCF.Credit       = _bDCustomerAccount.Credit;
                _bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber;
                _bDCustomerAccountWCF.InvoiceType  = _bDCustomerAccount.InvoiceType;
                _bDCustomerAccountWCF.LstDayToPay  = _bDCustomerAccount.LstDayToPay;

                bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
            }
            return(bDCustomerAccountCollection);
        }
Beispiel #6
0
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class BDCustomerAccount</param>
        /// <param name="fieldValue" type="object">Value for the field specified.</param>
        /// <param name="fieldValue2" type="object">Value for the field specified.</param>
        /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
        ///
        /// <returns>List of object of class BDCustomerAccount in the form of an object of class BDCustomerAccountCollection</returns>
        public BDCustomerAccountCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();

            foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _bDCustomerAccountWCF = new BDCustomerAccount();

                _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
                _bDCustomerAccountWCF.CustomerID            = _bDCustomerAccount.CustomerID;
                _bDCustomerAccountWCF.SalesInvoiceId        = _bDCustomerAccount.SalesInvoiceId;
                _bDCustomerAccountWCF.SalesDate             = _bDCustomerAccount.SalesDate;
                _bDCustomerAccountWCF.InvoiceNumber         = _bDCustomerAccount.InvoiceNumber;
                _bDCustomerAccountWCF.TotalPrice            = _bDCustomerAccount.TotalPrice;
                _bDCustomerAccountWCF.PaidAmount            = _bDCustomerAccount.PaidAmount;
                _bDCustomerAccountWCF.RemainingAmount       = _bDCustomerAccount.RemainingAmount;
                _bDCustomerAccountWCF.IsVoid       = _bDCustomerAccount.IsVoid;
                _bDCustomerAccountWCF.CreatedBy    = _bDCustomerAccount.CreatedBy;
                _bDCustomerAccountWCF.CreateDate   = _bDCustomerAccount.CreateDate;
                _bDCustomerAccountWCF.UpdatedBy    = _bDCustomerAccount.UpdatedBy;
                _bDCustomerAccountWCF.UpdateDate   = _bDCustomerAccount.UpdateDate;
                _bDCustomerAccountWCF.IsDeleted    = _bDCustomerAccount.IsDeleted;
                _bDCustomerAccountWCF.DeletedBy    = _bDCustomerAccount.DeletedBy;
                _bDCustomerAccountWCF.DeletedDate  = _bDCustomerAccount.DeletedDate;
                _bDCustomerAccountWCF.Depit        = _bDCustomerAccount.Depit;
                _bDCustomerAccountWCF.Credit       = _bDCustomerAccount.Credit;
                _bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber;
                _bDCustomerAccountWCF.InvoiceType  = _bDCustomerAccount.InvoiceType;
                _bDCustomerAccountWCF.LstDayToPay  = _bDCustomerAccount.LstDayToPay;

                bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
            }
            return(bDCustomerAccountCollection);
        }
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class BDCustomerAccount in the form of object of BDCustomerAccountCollection </returns>
		public BDCustomerAccountCollection SelectAll()
		{
			BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();
			foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAll())
			{
				_bDCustomerAccountWCF = new BDCustomerAccount();
				
				_bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
				_bDCustomerAccountWCF.CustomerID = _bDCustomerAccount.CustomerID;
				_bDCustomerAccountWCF.SalesInvoiceId = _bDCustomerAccount.SalesInvoiceId;
				_bDCustomerAccountWCF.SalesDate = _bDCustomerAccount.SalesDate;
				_bDCustomerAccountWCF.InvoiceNumber = _bDCustomerAccount.InvoiceNumber;
				_bDCustomerAccountWCF.TotalPrice = _bDCustomerAccount.TotalPrice;
				_bDCustomerAccountWCF.PaidAmount = _bDCustomerAccount.PaidAmount;
				_bDCustomerAccountWCF.RemainingAmount = _bDCustomerAccount.RemainingAmount;
				_bDCustomerAccountWCF.IsVoid = _bDCustomerAccount.IsVoid;
				_bDCustomerAccountWCF.CreatedBy = _bDCustomerAccount.CreatedBy;
				_bDCustomerAccountWCF.CreateDate = _bDCustomerAccount.CreateDate;
				_bDCustomerAccountWCF.UpdatedBy = _bDCustomerAccount.UpdatedBy;
				_bDCustomerAccountWCF.UpdateDate = _bDCustomerAccount.UpdateDate;
				_bDCustomerAccountWCF.IsDeleted = _bDCustomerAccount.IsDeleted;
				_bDCustomerAccountWCF.DeletedBy = _bDCustomerAccount.DeletedBy;
				_bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate;
				_bDCustomerAccountWCF.Depit = _bDCustomerAccount.Depit;
				_bDCustomerAccountWCF.Credit = _bDCustomerAccount.Credit;
				_bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber;
				_bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType;
				_bDCustomerAccountWCF.LstDayToPay = _bDCustomerAccount.LstDayToPay;
				
				bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
			}
			return bDCustomerAccountCollection;
		}
		/// <summary>
		/// This method will return a list of objects representing the specified number of entries from the specified record number in the table 
		/// using the value of the field specified
		/// </summary>
		///
		/// <param name="field" type="string">Field of the class BDCustomerAccount</param>
		/// <param name="fieldValue" type="object">Value for the field specified.</param>
		/// <param name="fieldValue2" type="object">Value for the field specified.</param>
		/// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
		/// <param name="orderByStatement" type="string">The field value to number.</param>
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		///
		/// <returns>List of object of class BDCustomerAccount in the form of an object of class BDCustomerAccountCollection</returns>
		public BDCustomerAccountCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection();
			foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_bDCustomerAccountWCF = new BDCustomerAccount();
				
				_bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
				_bDCustomerAccountWCF.CustomerID = _bDCustomerAccount.CustomerID;
				_bDCustomerAccountWCF.SalesInvoiceId = _bDCustomerAccount.SalesInvoiceId;
				_bDCustomerAccountWCF.SalesDate = _bDCustomerAccount.SalesDate;
				_bDCustomerAccountWCF.InvoiceNumber = _bDCustomerAccount.InvoiceNumber;
				_bDCustomerAccountWCF.TotalPrice = _bDCustomerAccount.TotalPrice;
				_bDCustomerAccountWCF.PaidAmount = _bDCustomerAccount.PaidAmount;
				_bDCustomerAccountWCF.RemainingAmount = _bDCustomerAccount.RemainingAmount;
				_bDCustomerAccountWCF.IsVoid = _bDCustomerAccount.IsVoid;
				_bDCustomerAccountWCF.CreatedBy = _bDCustomerAccount.CreatedBy;
				_bDCustomerAccountWCF.CreateDate = _bDCustomerAccount.CreateDate;
				_bDCustomerAccountWCF.UpdatedBy = _bDCustomerAccount.UpdatedBy;
				_bDCustomerAccountWCF.UpdateDate = _bDCustomerAccount.UpdateDate;
				_bDCustomerAccountWCF.IsDeleted = _bDCustomerAccount.IsDeleted;
				_bDCustomerAccountWCF.DeletedBy = _bDCustomerAccount.DeletedBy;
				_bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate;
				_bDCustomerAccountWCF.Depit = _bDCustomerAccount.Depit;
				_bDCustomerAccountWCF.Credit = _bDCustomerAccount.Credit;
				_bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber;
				_bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType;
				_bDCustomerAccountWCF.LstDayToPay = _bDCustomerAccount.LstDayToPay;
				
				bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
			}
			return bDCustomerAccountCollection;
		}
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="SALSalesHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param>
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		/// <param name="orderByStatement" type="string">The field value to number.</param>
		///
		/// <returns>object of class BDCustomerAccountCollection</returns>
		public BDCustomerAccountCollection SelectAllByForeignKeySalesInvoiceIdPaged(SALSalesHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
		{
			BDCustomerAccountCollection bDCustomerAccountCollection=new BDCustomerAccountCollection();
			foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAllByForeignKeySalesInvoiceIdPaged(new POS.DataLayer.SALSalesHeaderPrimaryKey(pk.SalesHeaderID), pageSize, skipPages, orderByStatement))
			{
				_bDCustomerAccountWCF = new BDCustomerAccount();
				_bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber;
				_bDCustomerAccountWCF.CustomerID = _bDCustomerAccount.CustomerID;
				_bDCustomerAccountWCF.SalesInvoiceId = _bDCustomerAccount.SalesInvoiceId;
				_bDCustomerAccountWCF.SalesDate = _bDCustomerAccount.SalesDate;
				_bDCustomerAccountWCF.InvoiceNumber = _bDCustomerAccount.InvoiceNumber;
				_bDCustomerAccountWCF.TotalPrice = _bDCustomerAccount.TotalPrice;
				_bDCustomerAccountWCF.PaidAmount = _bDCustomerAccount.PaidAmount;
				_bDCustomerAccountWCF.RemainingAmount = _bDCustomerAccount.RemainingAmount;
				_bDCustomerAccountWCF.IsVoid = _bDCustomerAccount.IsVoid;
				_bDCustomerAccountWCF.CreatedBy = _bDCustomerAccount.CreatedBy;
				_bDCustomerAccountWCF.CreateDate = _bDCustomerAccount.CreateDate;
				_bDCustomerAccountWCF.UpdatedBy = _bDCustomerAccount.UpdatedBy;
				_bDCustomerAccountWCF.UpdateDate = _bDCustomerAccount.UpdateDate;
				_bDCustomerAccountWCF.IsDeleted = _bDCustomerAccount.IsDeleted;
				_bDCustomerAccountWCF.DeletedBy = _bDCustomerAccount.DeletedBy;
				_bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate;
				_bDCustomerAccountWCF.Depit = _bDCustomerAccount.Depit;
				_bDCustomerAccountWCF.Credit = _bDCustomerAccount.Credit;
				_bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber;
				_bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType;
				_bDCustomerAccountWCF.LstDayToPay = _bDCustomerAccount.LstDayToPay;
				
				bDCustomerAccountCollection.Add(_bDCustomerAccountWCF);
			}
			return bDCustomerAccountCollection;
		}
Beispiel #10
0
		/// <summary>
		/// Populates the fields for multiple objects from the columns found in an open reader.
		/// </summary>
		///
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <returns>Object of BDCustomerAccountCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			6/13/2015 10:16:22 AM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static BDCustomerAccountCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			BDCustomerAccountCollection list = new BDCustomerAccountCollection();
			
            if (rdr.Read())
			{
				BDCustomerAccount obj = new BDCustomerAccount();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new BDCustomerAccount();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
                return list;
			}
			
		}
Beispiel #11
0
		/// <summary>
		/// Populates the fields for multiple objects from the columns found in an open reader.
		/// </summary>
		///
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <returns>Object of BDCustomerAccountCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			6/13/2015 10:16:22 AM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static BDCustomerAccountCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			BDCustomerAccountCollection list = new BDCustomerAccountCollection();
			
			while (rdr.Read())
			{
				BDCustomerAccount obj = new BDCustomerAccount();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
Beispiel #12
0
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="SALSalesHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param>
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		/// <param name="orderByStatement" type="string">The field value to number</param>
		///
		/// <returns>object of class BDCustomerAccountCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			6/13/2015 10:16:22 AM				Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		public static BDCustomerAccountCollection SelectAllByForeignKeySalesInvoiceIdPaged(SALSalesHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
		{
			DatabaseHelper oDatabaseHelper = new DatabaseHelper();
			bool ExecutionState = false;
			BDCustomerAccountCollection obj = null;
			
			// Pass the values of all key parameters to the stored procedure.
			System.Collections.Specialized.NameValueCollection nvc = pk.GetKeysAndValues();
			foreach (string key in nvc.Keys)
			{
				oDatabaseHelper.AddParameter("@" + key,nvc[key] );
			}
			oDatabaseHelper.AddParameter("@PageSize",pageSize);
			oDatabaseHelper.AddParameter("@SkipPages", skipPages);
			oDatabaseHelper.AddParameter("@OrderByStatement", orderByStatement );
			
			// The parameter '@dlgErrorCode' will contain the status after execution of the stored procedure.
			oDatabaseHelper.AddParameter("@dlgErrorCode", -1, System.Data.ParameterDirection.Output);
			
			IDataReader dr=oDatabaseHelper.ExecuteReader("gsp_BDCustomerAccounts_SelectAllByForeignKeySalesInvoiceIdPaged", ref ExecutionState);
			obj = new BDCustomerAccountCollection();
			obj = BDCustomerAccount.PopulateObjectsFromReaderWithCheckingReader(dr, oDatabaseHelper);
			
			dr.Close();  
			oDatabaseHelper.Dispose();
			return obj;
			
		}