Esempio n. 1
0
        /////

        public bool SaveTransferOrder(INVTransferHeader transferHeader, INVTransferLineCollection sALSalesLineCollection)
        {
            POS.DataLayer.INVTransferHeader _transferHeader = new POS.DataLayer.INVTransferHeader();
            _transferHeader.TransferDate    = DateTime.Now;
            _transferHeader.InvoiceDate     = DateTime.Now;
            _transferHeader.FromInventoryID = transferHeader.FromInventoryID;
            _transferHeader.ToInventoryID   = transferHeader.ToInventoryID;
            _transferHeader.IsClosed        = false;
            _transferHeader.CreatedBy       = GlobalVariables.CurrentUser.UserID;
            _transferHeader.CreateDate      = DateTime.Now;
            _transferHeader.UpdatedBy       = null;
            _transferHeader.UpdateDate      = null;
            _transferHeader.IsDeleted       = false;
            _transferHeader.DeletedBy       = null;
            _transferHeader.DeletedDate     = null;

            POS.DataLayer.INVTransferLineCollection _sALSalesLineCollection = new DataLayer.INVTransferLineCollection();
            foreach (INVTransferLine sALSalesLine in sALSalesLineCollection)
            {
                POS.DataLayer.INVTransferLine _sALSalesLine = new POS.DataLayer.INVTransferLine();
                _sALSalesLine.ProductID   = sALSalesLine.ProductID;
                _sALSalesLine.Qty         = sALSalesLine.Qty;
                _sALSalesLine.CreatedBy   = GlobalVariables.CurrentUser.UserID;
                _sALSalesLine.CreateDate  = DateTime.Now;
                _sALSalesLine.UpdatedBy   = null;
                _sALSalesLine.UpdateDate  = null;
                _sALSalesLine.IsDeleted   = false;
                _sALSalesLine.DeletedBy   = null;
                _sALSalesLine.DeletedDate = null;
                _sALSalesLineCollection.Add(_sALSalesLine);
            }
            POS.DataLayer.INVTransferLine transferLineObj = new DataLayer.INVTransferLine();
            return(transferLineObj.SaveTransaction(_transferHeader, _sALSalesLineCollection));
        }
Esempio n. 2
0
        public bool CloseOrder(int INVTransferHeaderID)
        {
            INVTransferHeaderPrimaryKey pk = new INVTransferHeaderPrimaryKey();

            pk.INVTransferHeaderID = INVTransferHeaderID;
            INVTransferLineCollection transferLineCollection = null;// transferLineService.SelectAllByForeignKeyTransferHeaderID(pk);

            POS.DataLayer.INVTransferLineCollection _transferLineCollection = new DataLayer.INVTransferLineCollection();
            foreach (INVTransferLine transferLine in transferLineCollection)
            {
                POS.DataLayer.INVTransferLine _transferLine = new POS.DataLayer.INVTransferLine();
                _transferLine.ProductID        = transferLine.ProductID;
                _transferLine.Qty              = transferLine.Qty;
                _transferLine.TransferHeaderID = transferLine.TransferHeaderID;
                _transferLine.TransferLineID   = transferLine.TransferLineID;
                _transferLine.CreatedBy        = transferLine.CreatedBy;
                _transferLine.CreateDate       = transferLine.CreateDate;
                _transferLine.UpdatedBy        = transferLine.UpdatedBy;
                _transferLine.UpdateDate       = transferLine.UpdateDate;
                _transferLine.IsDeleted        = transferLine.IsDeleted;
                _transferLine.DeletedBy        = transferLine.DeletedBy;
                _transferLine.DeletedDate      = transferLine.DeletedDate;
                _transferLineCollection.Add(_transferLine);
            }
            return(_invTransferHeader.CloseOrder(INVTransferHeaderID, Utility.GlobalVariables.CurrentUser.UserID, _transferLineCollection));
        }
Esempio n. 3
0
        /////

        public bool SaveTransferOrder(INVTransferHeader transferHeader, INVTransferLineCollection sALSalesLineCollection)
        {
            POS.DataLayer.INVTransferHeader _transferHeader = new POS.DataLayer.INVTransferHeader();
            _transferHeader.TransferDate = DateTime.Now;
            _transferHeader.InvoiceDate = DateTime.Now;
            _transferHeader.FromInventoryID = transferHeader.FromInventoryID;
            _transferHeader.ToInventoryID = transferHeader.ToInventoryID;
            _transferHeader.IsClosed = false;
            _transferHeader.CreatedBy = GlobalVariables.CurrentUser.UserID;
            _transferHeader.CreateDate = DateTime.Now;
            _transferHeader.UpdatedBy = null;
            _transferHeader.UpdateDate = null;
            _transferHeader.IsDeleted = false;
            _transferHeader.DeletedBy = null;
            _transferHeader.DeletedDate = null;

            POS.DataLayer.INVTransferLineCollection _sALSalesLineCollection = new DataLayer.INVTransferLineCollection();
            foreach (INVTransferLine sALSalesLine in sALSalesLineCollection)
            {
                POS.DataLayer.INVTransferLine _sALSalesLine = new POS.DataLayer.INVTransferLine();
                _sALSalesLine.ProductID = sALSalesLine.ProductID;
                _sALSalesLine.Qty = sALSalesLine.Qty;
                _sALSalesLine.CreatedBy = GlobalVariables.CurrentUser.UserID;
                _sALSalesLine.CreateDate = DateTime.Now;
                _sALSalesLine.UpdatedBy = null;
                _sALSalesLine.UpdateDate = null;
                _sALSalesLine.IsDeleted = false;
                _sALSalesLine.DeletedBy = null;
                _sALSalesLine.DeletedDate = null;
                _sALSalesLineCollection.Add(_sALSalesLine);
            }
            POS.DataLayer.INVTransferLine transferLineObj = new DataLayer.INVTransferLine();
            return transferLineObj.SaveTransaction(_transferHeader, _sALSalesLineCollection);
        }
Esempio n. 4
0
        public bool CloseOrder(int INVTransferHeaderID)
        {
            INVTransferHeaderPrimaryKey pk = new INVTransferHeaderPrimaryKey();
            pk.INVTransferHeaderID = INVTransferHeaderID;
            INVTransferLineCollection transferLineCollection = null;// transferLineService.SelectAllByForeignKeyTransferHeaderID(pk);

            POS.DataLayer.INVTransferLineCollection _transferLineCollection = new DataLayer.INVTransferLineCollection();
            foreach (INVTransferLine transferLine in transferLineCollection)
            {
                POS.DataLayer.INVTransferLine _transferLine = new POS.DataLayer.INVTransferLine();
                _transferLine.ProductID = transferLine.ProductID;
                _transferLine.Qty = transferLine.Qty;
                _transferLine.TransferHeaderID = transferLine.TransferHeaderID;
                _transferLine.TransferLineID = transferLine.TransferLineID;
                _transferLine.CreatedBy = transferLine.CreatedBy;
                _transferLine.CreateDate = transferLine.CreateDate;
                _transferLine.UpdatedBy = transferLine.UpdatedBy;
                _transferLine.UpdateDate = transferLine.UpdateDate;
                _transferLine.IsDeleted = transferLine.IsDeleted;
                _transferLine.DeletedBy = transferLine.DeletedBy;
                _transferLine.DeletedDate = transferLine.DeletedDate;
                _transferLineCollection.Add(_transferLine);
            }
            return _invTransferHeader.CloseOrder(INVTransferHeaderID, Utility.GlobalVariables.CurrentUser.UserID, _transferLineCollection);

        }