Пример #1
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="INVInventoryPrimaryKey">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 SALSalesReturnHeaderCollection</returns>
        public SALSalesReturnHeaderCollection SelectAllByForeignKeyInventoryIDPaged(INVInventoryPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
        {
            SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();

            foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectAllByForeignKeyInventoryIDPaged(new POS.DataLayer.INVInventoryPrimaryKey(pk.InventoryID), pageSize, skipPages, orderByStatement))
            {
                _sALSalesReturnHeaderWCF = new SALSalesReturnHeader();
                _sALSalesReturnHeaderWCF.SlaesReturnHeaderID  = _sALSalesReturnHeader.SlaesReturnHeaderID;
                _sALSalesReturnHeaderWCF.ReturnDate           = _sALSalesReturnHeader.ReturnDate;
                _sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
                _sALSalesReturnHeaderWCF.CreatedBy            = _sALSalesReturnHeader.CreatedBy;
                _sALSalesReturnHeaderWCF.CreateDate           = _sALSalesReturnHeader.CreateDate;
                _sALSalesReturnHeaderWCF.UpdatedBy            = _sALSalesReturnHeader.UpdatedBy;
                _sALSalesReturnHeaderWCF.UpdateDate           = _sALSalesReturnHeader.UpdateDate;
                _sALSalesReturnHeaderWCF.IsDeleted            = _sALSalesReturnHeader.IsDeleted;
                _sALSalesReturnHeaderWCF.DeletedBy            = _sALSalesReturnHeader.DeletedBy;
                _sALSalesReturnHeaderWCF.DeleteDate           = _sALSalesReturnHeader.DeleteDate;
                _sALSalesReturnHeaderWCF.IsClosed             = _sALSalesReturnHeader.IsClosed;
                _sALSalesReturnHeaderWCF.IsVoid      = _sALSalesReturnHeader.IsVoid;
                _sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
                _sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;

                sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
            }
            return(sALSalesReturnHeaderCollection);
        }
Пример #2
0
 private void initEntity(int inventoryId)
 {
     INVInventoryPrimaryKey pk = new INVInventoryPrimaryKey();
     pk.InventoryID = inventoryId;
     _invInventory = _invInventoryWrapper.SelectOne(pk);
     txt_InventoryName.Text =_invInventory.InventoryName;
     txt_Notes.Text = _invInventory.Notes;
 }
Пример #3
0
        /// <summary>
        /// This method will return an object representing the record matching the primary key information specified.
        /// </summary>
        ///
        /// <param name="pk" type="INVInventoryPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class INVInventory</returns>
        public INVInventory SelectOne(INVInventoryPrimaryKey pk)
        {
            _iNVInventoryWCF = new INVInventory();
            _iNVInventory    = POS.DataLayer.INVInventoryBase.SelectOne(new POS.DataLayer.INVInventoryPrimaryKey(pk.InventoryID));

            _iNVInventoryWCF.InventoryID   = _iNVInventory.InventoryID;
            _iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
            _iNVInventoryWCF.Notes         = _iNVInventory.Notes;

            return(_iNVInventoryWCF);
        }
Пример #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="INVInventoryPrimaryKey">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 PURPurchaseHeaderCollection</returns>
        public PURPurchaseHeaderCollection SelectAllByForeignKeyInventoryIDPaged(INVInventoryPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
        {
            PURPurchaseHeaderCollection pURPurchaseHeaderCollection = new PURPurchaseHeaderCollection();

            foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectAllByForeignKeyInventoryIDPaged(new POS.DataLayer.INVInventoryPrimaryKey(pk.InventoryID), pageSize, skipPages, orderByStatement))
            {
                _pURPurchaseHeaderWCF = new PURPurchaseHeader();
                _pURPurchaseHeaderWCF.PurcaseHeaderID     = _pURPurchaseHeader.PurcaseHeaderID;
                _pURPurchaseHeaderWCF.PurchaseDate        = _pURPurchaseHeader.PurchaseDate;
                _pURPurchaseHeaderWCF.PaymentTypeID       = _pURPurchaseHeader.PaymentTypeID;
                _pURPurchaseHeaderWCF.SupplierID          = _pURPurchaseHeader.SupplierID;
                _pURPurchaseHeaderWCF.InvoiceNumber       = _pURPurchaseHeader.InvoiceNumber;
                _pURPurchaseHeaderWCF.CreateDate          = _pURPurchaseHeader.CreateDate;
                _pURPurchaseHeaderWCF.CreatedBy           = _pURPurchaseHeader.CreatedBy;
                _pURPurchaseHeaderWCF.updateDate          = _pURPurchaseHeader.updateDate;
                _pURPurchaseHeaderWCF.UpdatedBy           = _pURPurchaseHeader.UpdatedBy;
                _pURPurchaseHeaderWCF.IsDeleted           = _pURPurchaseHeader.IsDeleted;
                _pURPurchaseHeaderWCF.DeleteDate          = _pURPurchaseHeader.DeleteDate;
                _pURPurchaseHeaderWCF.TotalPrice          = _pURPurchaseHeader.TotalPrice;
                _pURPurchaseHeaderWCF.ServicePrice        = _pURPurchaseHeader.ServicePrice;
                _pURPurchaseHeaderWCF.PaidAmount          = _pURPurchaseHeader.PaidAmount;
                _pURPurchaseHeaderWCF.IsClosed            = _pURPurchaseHeader.IsClosed;
                _pURPurchaseHeaderWCF.IsVoid              = _pURPurchaseHeader.IsVoid;
                _pURPurchaseHeaderWCF.IsPrinted           = _pURPurchaseHeader.IsPrinted;
                _pURPurchaseHeaderWCF.RefuseReasonID      = _pURPurchaseHeader.RefuseReasonID;
                _pURPurchaseHeaderWCF.TotalDiscountAmount = _pURPurchaseHeader.TotalDiscountAmount;
                _pURPurchaseHeaderWCF.TotalDiscountRatio  = _pURPurchaseHeader.TotalDiscountRatio;
                _pURPurchaseHeaderWCF.TaxTypeID           = _pURPurchaseHeader.TaxTypeID;
                _pURPurchaseHeaderWCF.RemainingAmount     = _pURPurchaseHeader.RemainingAmount;
                _pURPurchaseHeaderWCF.LastDayToPay        = _pURPurchaseHeader.LastDayToPay;
                _pURPurchaseHeaderWCF.DeletedBy           = _pURPurchaseHeader.DeletedBy;
                _pURPurchaseHeaderWCF.Notes        = _pURPurchaseHeader.Notes;
                _pURPurchaseHeaderWCF.InventoryID  = _pURPurchaseHeader.InventoryID;
                _pURPurchaseHeaderWCF.InvoiceDate  = _pURPurchaseHeader.InvoiceDate;
                _pURPurchaseHeaderWCF.ChequeNumber = _pURPurchaseHeader.ChequeNumber;

                pURPurchaseHeaderCollection.Add(_pURPurchaseHeaderWCF);
            }
            return(pURPurchaseHeaderCollection);
        }
Пример #5
0
 public override void btn_Delete_Click(object sender, EventArgs e)
 {
     int? productGroupID = 0;
     if (dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["InventoryID"].Value != null)
     {
         if (MessageBox.Show("هل نت متأكد من حذف المخزن؟", "تحذير", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             productGroupID = Convert.ToInt32(dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["InventoryID"].Value);
             INVInventoryPrimaryKey productGroupPK = new INVInventoryPrimaryKey();
             productGroupPK.InventoryID = productGroupID;
             _invInventoryWrapper.Delete(productGroupPK);
         }
         else
         {
             return;
         }
     }
     else
     {
         MessageBox.Show("لابد من اختيار مخزن");
     }
     InitiateGrid();
 
 }
Пример #6
0
 ///<summary>
 ///This method will Delete the object from the database
 ///</summary>
 ///<param name="pk" type="INVInventoryPrimaryKey">Primary Key information based on which data is to be fetched.</param>
 /// <returns>True if succeeded</returns>
 public bool Delete(INVInventoryPrimaryKey pk)
 {
     return(POS.DataLayer.INVInventoryBase.Delete(new POS.DataLayer.INVInventoryPrimaryKey(pk.InventoryID)));
 }
Пример #7
0
 /// <summary>
 /// This method will delete 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="INVInventoryPrimaryKey">Primary Key information based on which data is to be deleted.</param>
 ///
 /// <returns>True if succeeded</returns>
 public bool DeleteAllByForeignKeyInventoryID(INVInventoryPrimaryKey pk)
 {
     return(POS.DataLayer.PURPurchaseHeaderBase.DeleteAllByForeignKeyInventoryID(new POS.DataLayer.INVInventoryPrimaryKey(pk.InventoryID)));
 }