コード例 #1
0
 private void FillScreenWithDataForEdit(int salesReturnHeaderID)
 {
     sALSalesReturnHeader         = GetSalesReturnHeader(salesReturnHeaderID);
     sALSalesReturnLineCollection = GetSalesReturnLines(salesReturnHeaderID);
     vSALSalesOrderCollection     = GetSalesOriginalSalesOrderData((int)sALSalesReturnHeader.OriginalSalesHeadeID);
     FillScreenData();
 }
コード例 #2
0
        private static bool UpdateTransaction(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection, POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader)
        {
            _sALSalesReturnHeader.IsVoid = false;
            _sALSalesReturnHeader.CreatedBy = GlobalVariables.CurrentUser.UserID;
            _sALSalesReturnHeader.CreateDate = DateTime.Now;
            _sALSalesReturnHeader.UpdatedBy = GlobalVariables.CurrentUser.UserID;
            _sALSalesReturnHeader.UpdateDate = DateTime.Now;
            _sALSalesReturnHeader.IsDeleted = false;
            _sALSalesReturnHeader.DeletedBy = null;
            _sALSalesReturnHeader.DeleteDate = null;
            _sALSalesReturnHeader.OriginalSalesHeadeID = sALSalesReturnHeader.OriginalSalesHeadeID;
            _sALSalesReturnHeader.ReturnDate = sALSalesReturnHeader.ReturnDate;
            _sALSalesReturnHeader.SlaesReturnHeaderID = sALSalesReturnHeader.SlaesReturnHeaderID;
            _sALSalesReturnHeader.InventoryID = sALSalesReturnHeader.InventoryID;
            _sALSalesReturnHeader.ReturnMoney = sALSalesReturnHeader.ReturnMoney;

            POS.DataLayer.SALSalesReturnLineCollection _sALSalesReturnLineCollection = new DataLayer.SALSalesReturnLineCollection();
            foreach (SALSalesReturnLine sALSalesReturnLine in sALSalesReturnLineCollection)
            {
                POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine = new POS.DataLayer.SALSalesReturnLine();

                _sALSalesReturnLine.Qty = sALSalesReturnLine.Qty;
                _sALSalesReturnLine.BatchNumber = sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLine.ExpiryDate = sALSalesReturnLine.ExpiryDate;
                _sALSalesReturnLine.OriginalSalesLineID = sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLine.Reason = sALSalesReturnLine.Reason;

                _sALSalesReturnLineCollection.Add(_sALSalesReturnLine);
            }
            POS.DataLayer.SALSalesReturnLine sALSalesReturnLineObj = new DataLayer.SALSalesReturnLine();

            return sALSalesReturnLineObj.UpdateTransaction(_sALSalesReturnHeader, _sALSalesReturnLineCollection);
        }
コード例 #3
0
ファイル: SALSalesReturnLine.cs プロジェクト: kimboox44/POS
 public int SaveTransaction(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection)
 {
     oDatabaseHelper = new DatabaseHelper();
     bool ExecutionState = false;
     int salesReturnHeaderID = -1;
     oDatabaseHelper.BeginTransaction();
     if (InsertHeader(oDatabaseHelper, sALSalesReturnHeader, out salesReturnHeaderID))
     {
         foreach (SALSalesReturnLine sALSalesLine in sALSalesReturnLineCollection)
         {
             if (!InsertDetails(oDatabaseHelper, sALSalesLine, salesReturnHeaderID))
             {
                 ExecutionState = false;
                 break;
             }
             else
                 ExecutionState = true;
         }
         if (ExecutionState)
         {
             oDatabaseHelper.CommitTransaction();
         }
         else
         {
             oDatabaseHelper.RollbackTransaction();
             salesReturnHeaderID = -1;
         }
     }
     oDatabaseHelper.Dispose();
     return salesReturnHeaderID;
 }
コード例 #4
0
ファイル: SALSalesReturnLine.cs プロジェクト: kimboox44/POS
 public bool UpdateTransaction(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection)
 {
     oDatabaseHelper = new DatabaseHelper();
     bool ExecutionState = false;
     oDatabaseHelper.BeginTransaction();
     if (UpdateHeader(oDatabaseHelper, sALSalesReturnHeader))
     {
         if (DeleteDetails(oDatabaseHelper, (int)sALSalesReturnHeader.SlaesReturnHeaderID, (int)sALSalesReturnHeader.UpdatedBy))
         {
             foreach (SALSalesReturnLine sALSalesReturnLine in sALSalesReturnLineCollection)
             {
                 if (!InsertDetails(oDatabaseHelper, sALSalesReturnLine, (int)sALSalesReturnHeader.SlaesReturnHeaderID))
                 {
                     ExecutionState = false;
                     break;
                 }
                 else
                     ExecutionState = true;
             }
             if (ExecutionState)
                 oDatabaseHelper.CommitTransaction();
             else
                 oDatabaseHelper.RollbackTransaction();
         }
         else
             ExecutionState = false;
     }
     else
         ExecutionState = false;
     oDatabaseHelper.Dispose();
     return ExecutionState;
 }
コード例 #5
0
 public frmSalesReturnOrderAddEdit()
 {
     InitializeComponent();
     sALSalesReturnHeaderWrapper  = new SALSalesReturnHeaderWrapper();
     sALSalesReturnLineWrraper    = new SALSalesReturnLineWrraper();
     bDProductWrapper             = new BDProductWrapper();
     sALSalesReturnHeader         = new SALSalesReturnHeader();
     sALSalesReturnLineCollection = new SALSalesReturnLineCollection();
     FillProductCBX();
 }
コード例 #6
0
 public frmSalesReturnOrderAddEdit()
 {
     InitializeComponent();
     sALSalesReturnHeaderWrapper  = new SALSalesReturnHeaderWrapper();
     sALSalesReturnLineWrraper    = new SALSalesReturnLineWrraper();
     bDProductWrapper             = new BDProductWrapper();
     iNVStockTypeWrapper          = new INVStockTypeWrapper();
     sALSalesReturnHeader         = new SALSalesReturnHeader();
     sALSalesReturnLineCollection = new SALSalesReturnLineCollection();
     FillInventoryCBX();
     FillProductCBX();
     FillStockTypeCBX();
     dgrd_ReturnOrderLines.Enabled = false;
 }
コード例 #7
0
 public frmSalesReturnOrderAddEdit()
 {
     InitializeComponent();
     sALSalesReturnHeaderWrapper = new SALSalesReturnHeaderWrapper();
     sALSalesReturnLineWrraper = new SALSalesReturnLineWrraper();
     bDProductWrapper = new BDProductWrapper();
     iNVStockTypeWrapper = new INVStockTypeWrapper();
     sALSalesReturnHeader = new SALSalesReturnHeader();
     sALSalesReturnLineCollection = new SALSalesReturnLineCollection();
     FillInventoryCBX();
     FillProductCBX();
     FillStockTypeCBX();
     dgrd_ReturnOrderLines.Enabled = false;
 }
コード例 #8
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 SALSalesReturnLine in the form of an object of class SALSalesReturnLineCollection </returns>
        public SALSalesReturnLineCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();

            foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _sALSalesReturnLineWCF = new SALSalesReturnLine();

                _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
                _sALSalesReturnLineWCF.Qty    = _sALSalesReturnLine.Qty;
                _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
                _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLineWCF.BatchID             = _sALSalesReturnLine.BatchID;
                _sALSalesReturnLineWCF.BatchNumber         = _sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLineWCF.ExpiryDate          = _sALSalesReturnLine.ExpiryDate;

                sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
            }
            return(sALSalesReturnLineCollection);
        }
コード例 #9
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="SALSalesReturnHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class SALSalesReturnLineCollection</returns>
        public SALSalesReturnLineCollection SelectAllByForeignKeySalesReturnHeaderID(SALSalesReturnHeaderPrimaryKey pk)
        {
            SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();

            foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAllByForeignKeySalesReturnHeaderID(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID)))
            {
                _sALSalesReturnLineWCF = new SALSalesReturnLine();
                _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
                _sALSalesReturnLineWCF.Qty    = _sALSalesReturnLine.Qty;
                _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
                _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLineWCF.BatchID             = _sALSalesReturnLine.BatchID;
                _sALSalesReturnLineWCF.BatchNumber         = _sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLineWCF.ExpiryDate          = _sALSalesReturnLine.ExpiryDate;
                _sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID;

                sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
            }
            return(sALSalesReturnLineCollection);
        }
コード例 #10
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 SALSalesReturnLine</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 SALSalesReturnLine in the form of an object of class SALSalesReturnLineCollection</returns>
        public SALSalesReturnLineCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();

            foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _sALSalesReturnLineWCF = new SALSalesReturnLine();

                _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
                _sALSalesReturnLineWCF.Qty    = _sALSalesReturnLine.Qty;
                _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
                _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLineWCF.BatchID             = _sALSalesReturnLine.BatchID;
                _sALSalesReturnLineWCF.BatchNumber         = _sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLineWCF.ExpiryDate          = _sALSalesReturnLine.ExpiryDate;

                sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
            }
            return(sALSalesReturnLineCollection);
        }
コード例 #11
0
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class SALSalesReturnLine in the form of object of SALSalesReturnLineCollection </returns>
		public SALSalesReturnLineCollection SelectAll()
		{
			SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();
			foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAll())
			{
				_sALSalesReturnLineWCF = new SALSalesReturnLine();
				
				_sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
				_sALSalesReturnLineWCF.Qty = _sALSalesReturnLine.Qty;
				_sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
				_sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
				_sALSalesReturnLineWCF.BatchID = _sALSalesReturnLine.BatchID;
				_sALSalesReturnLineWCF.BatchNumber = _sALSalesReturnLine.BatchNumber;
				_sALSalesReturnLineWCF.ExpiryDate = _sALSalesReturnLine.ExpiryDate;
				_sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID;
				
				sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
			}
			return sALSalesReturnLineCollection;
		}
コード例 #12
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class SALSalesReturnLine in the form of object of SALSalesReturnLineCollection </returns>
        public SALSalesReturnLineCollection SelectAll()
        {
            SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();

            foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAll())
            {
                _sALSalesReturnLineWCF = new SALSalesReturnLine();

                _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
                _sALSalesReturnLineWCF.Qty    = _sALSalesReturnLine.Qty;
                _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
                _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLineWCF.BatchID             = _sALSalesReturnLine.BatchID;
                _sALSalesReturnLineWCF.BatchNumber         = _sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLineWCF.ExpiryDate          = _sALSalesReturnLine.ExpiryDate;

                sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
            }
            return(sALSalesReturnLineCollection);
        }
コード例 #13
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="SALSalesReturnHeaderPrimaryKey">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 SALSalesReturnLineCollection</returns>
        public SALSalesReturnLineCollection SelectAllByForeignKeySalesReturnHeaderIDPaged(SALSalesReturnHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
        {
            SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();

            foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAllByForeignKeySalesReturnHeaderIDPaged(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID), pageSize, skipPages, orderByStatement))
            {
                _sALSalesReturnLineWCF = new SALSalesReturnLine();
                _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
                _sALSalesReturnLineWCF.Qty    = _sALSalesReturnLine.Qty;
                _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
                _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLineWCF.BatchID             = _sALSalesReturnLine.BatchID;
                _sALSalesReturnLineWCF.BatchNumber         = _sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLineWCF.ExpiryDate          = _sALSalesReturnLine.ExpiryDate;
                _sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID;

                sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
            }
            return(sALSalesReturnLineCollection);
        }
コード例 #14
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 SALSalesReturnLine</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 SALSalesReturnLine in the form of an object of class SALSalesReturnLineCollection</returns>
        public SALSalesReturnLineCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();

            foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _sALSalesReturnLineWCF = new SALSalesReturnLine();

                _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
                _sALSalesReturnLineWCF.Qty    = _sALSalesReturnLine.Qty;
                _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
                _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLineWCF.BatchID             = _sALSalesReturnLine.BatchID;
                _sALSalesReturnLineWCF.BatchNumber         = _sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLineWCF.ExpiryDate          = _sALSalesReturnLine.ExpiryDate;
                _sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID;

                sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
            }
            return(sALSalesReturnLineCollection);
        }
コード例 #15
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 SALSalesReturnLineCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/4/2015 6:56:38 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static SALSalesReturnLineCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			SALSalesReturnLineCollection list = new SALSalesReturnLineCollection();
			
            if (rdr.Read())
			{
				SALSalesReturnLine obj = new SALSalesReturnLine();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new SALSalesReturnLine();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
コード例 #16
0
        private static bool UpdateTransaction(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection, POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader)
        {
            _sALSalesReturnHeader.IsVoid = false;
            _sALSalesReturnHeader.CreatedBy = GlobalVariables.CurrentUser.UserID;
            _sALSalesReturnHeader.CreateDate = DateTime.Now;
            _sALSalesReturnHeader.UpdatedBy = GlobalVariables.CurrentUser.UserID;
            _sALSalesReturnHeader.UpdateDate = DateTime.Now;
            _sALSalesReturnHeader.IsDeleted = false;
            _sALSalesReturnHeader.DeletedBy = null;
            _sALSalesReturnHeader.DeleteDate = null;
            _sALSalesReturnHeader.OriginalSalesHeadeID = sALSalesReturnHeader.OriginalSalesHeadeID;
            _sALSalesReturnHeader.ReturnDate = sALSalesReturnHeader.ReturnDate;
            _sALSalesReturnHeader.SlaesReturnHeaderID = sALSalesReturnHeader.SlaesReturnHeaderID;

            POS.DataLayer.SALSalesReturnLineCollection _sALSalesReturnLineCollection = new DataLayer.SALSalesReturnLineCollection();
            foreach (SALSalesReturnLine sALSalesReturnLine in sALSalesReturnLineCollection)
            {
                POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine = new POS.DataLayer.SALSalesReturnLine();

                _sALSalesReturnLine.Qty = sALSalesReturnLine.Qty;
                _sALSalesReturnLine.BatchNumber = sALSalesReturnLine.BatchNumber;
                _sALSalesReturnLine.ExpiryDate = sALSalesReturnLine.ExpiryDate;
                _sALSalesReturnLine.OriginalSalesLineID = sALSalesReturnLine.OriginalSalesLineID;
                _sALSalesReturnLine.Reason = sALSalesReturnLine.Reason;

                _sALSalesReturnLineCollection.Add(_sALSalesReturnLine);
            }
            POS.DataLayer.SALSalesReturnLine sALSalesReturnLineObj = new DataLayer.SALSalesReturnLine();

            return sALSalesReturnLineObj.UpdateTransaction(_sALSalesReturnHeader, _sALSalesReturnLineCollection);
        }
コード例 #17
0
 public bool UpdateSALSalesOrder(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection)
 {
     POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader = new POS.DataLayer.SALSalesReturnHeader();
     _sALSalesReturnHeader.IsClosed = false;
     return UpdateTransaction(sALSalesReturnHeader, sALSalesReturnLineCollection, _sALSalesReturnHeader);
 }
コード例 #18
0
 public int SaveCloseSALSalesReturnOrder(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection)
 {
     POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader = new POS.DataLayer.SALSalesReturnHeader();
     _sALSalesReturnHeader.IsClosed = true;
     return SaveTransaction(sALSalesReturnHeader, sALSalesReturnLineCollection, _sALSalesReturnHeader);
 }
コード例 #19
0
 public bool UpdateCloseSALSalesOrder(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection)
 {
     POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader = new POS.DataLayer.SALSalesReturnHeader();
     _sALSalesReturnHeader.IsClosed = true;
     return UpdateTransaction(sALSalesReturnHeader, sALSalesReturnLineCollection, _sALSalesReturnHeader);
 }
コード例 #20
0
 private void FillScreenWithDataForEdit(int salesReturnHeaderID)
 {
     sALSalesReturnHeader = GetSalesReturnHeader(salesReturnHeaderID);
     sALSalesReturnLineCollection = GetSalesReturnLines(salesReturnHeaderID);
     vSALSalesOrderCollection = GetSalesOriginalSalesOrderData((int)sALSalesReturnHeader.OriginalSalesHeadeID);
     FillScreenData();
 }
コード例 #21
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="SALSalesReturnHeaderPrimaryKey">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 SALSalesReturnLineCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/4/2015 6:56:38 PM				Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		public static SALSalesReturnLineCollection SelectAllByForeignKeySalesReturnHeaderIDPaged(SALSalesReturnHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
		{
			DatabaseHelper oDatabaseHelper = new DatabaseHelper();
			bool ExecutionState = false;
			SALSalesReturnLineCollection 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_SALSalesReturnLine_SelectAllByForeignKeySalesReturnHeaderIDPaged", ref ExecutionState);
			obj = new SALSalesReturnLineCollection();
			obj = SALSalesReturnLine.PopulateObjectsFromReaderWithCheckingReader(dr, oDatabaseHelper);
			
			dr.Close();  
			oDatabaseHelper.Dispose();
			return obj;
			
		}
コード例 #22
0
 public int SaveSALSalesReturnOrder(SALSalesReturnHeader sALSalesReturnHeader, SALSalesReturnLineCollection sALSalesReturnLineCollection)
 {
     POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader = new POS.DataLayer.SALSalesReturnHeader();
     _sALSalesReturnHeader.IsClosed = false;
     return SaveTransaction(sALSalesReturnHeader, sALSalesReturnLineCollection, _sALSalesReturnHeader);
 }
コード例 #23
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 SALSalesReturnLine</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 SALSalesReturnLine in the form of an object of class SALSalesReturnLineCollection</returns>
		public SALSalesReturnLineCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();
			foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_sALSalesReturnLineWCF = new SALSalesReturnLine();
				
				_sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
				_sALSalesReturnLineWCF.Qty = _sALSalesReturnLine.Qty;
				_sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
				_sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
				_sALSalesReturnLineWCF.BatchID = _sALSalesReturnLine.BatchID;
				_sALSalesReturnLineWCF.BatchNumber = _sALSalesReturnLine.BatchNumber;
				_sALSalesReturnLineWCF.ExpiryDate = _sALSalesReturnLine.ExpiryDate;
				_sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID;
				
				sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
			}
			return sALSalesReturnLineCollection;
		}
コード例 #24
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 SALSalesReturnLine in the form of an object of class SALSalesReturnLineCollection </returns>
		public SALSalesReturnLineCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			SALSalesReturnLineCollection sALSalesReturnLineCollection = new SALSalesReturnLineCollection();
			foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_sALSalesReturnLineWCF = new SALSalesReturnLine();
				
				_sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID;
				_sALSalesReturnLineWCF.Qty = _sALSalesReturnLine.Qty;
				_sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason;
				_sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID;
				_sALSalesReturnLineWCF.BatchID = _sALSalesReturnLine.BatchID;
				_sALSalesReturnLineWCF.BatchNumber = _sALSalesReturnLine.BatchNumber;
				_sALSalesReturnLineWCF.ExpiryDate = _sALSalesReturnLine.ExpiryDate;
				_sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID;
				
				sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF);
			}
			return sALSalesReturnLineCollection;
		}
コード例 #25
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 SALSalesReturnLineCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/4/2015 6:56:38 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static SALSalesReturnLineCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			SALSalesReturnLineCollection list = new SALSalesReturnLineCollection();
			
			while (rdr.Read())
			{
				SALSalesReturnLine obj = new SALSalesReturnLine();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}