/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="INVStockTypePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVStockType</returns> public INVStockType SelectOne(INVStockTypePrimaryKey pk) { _iNVStockTypeWCF = new INVStockType(); _iNVStockType = POS.DataLayer.INVStockTypeBase.SelectOne(new POS.DataLayer.INVStockTypePrimaryKey(pk.StockTypeID)); _iNVStockTypeWCF.StockTypeID = _iNVStockType.StockTypeID; _iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName; return _iNVStockTypeWCF; }
/// <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="INVStockTypePrimaryKey">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 INVTakingInventoryLineCollection</returns> public INVTakingInventoryLineCollection SelectAllByForeignKeyStockTypeIDPaged(INVStockTypePrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { INVTakingInventoryLineCollection iNVTakingInventoryLineCollection=new INVTakingInventoryLineCollection(); foreach (POS.DataLayer.INVTakingInventoryLine _iNVTakingInventoryLine in POS.DataLayer.INVTakingInventoryLineBase.SelectAllByForeignKeyStockTypeIDPaged(new POS.DataLayer.INVStockTypePrimaryKey(pk.StockTypeID), pageSize, skipPages, orderByStatement)) { _iNVTakingInventoryLineWCF = new INVTakingInventoryLine(); _iNVTakingInventoryLineWCF.TakingLineID = _iNVTakingInventoryLine.TakingLineID; _iNVTakingInventoryLineWCF.TakingHeaderID = _iNVTakingInventoryLine.TakingHeaderID; _iNVTakingInventoryLineWCF.ProductID = _iNVTakingInventoryLine.ProductID; _iNVTakingInventoryLineWCF.ActualQty = _iNVTakingInventoryLine.ActualQty; _iNVTakingInventoryLineWCF.ExpectedQty = _iNVTakingInventoryLine.ExpectedQty; _iNVTakingInventoryLineWCF.CreatedBy = _iNVTakingInventoryLine.CreatedBy; _iNVTakingInventoryLineWCF.CreateDate = _iNVTakingInventoryLine.CreateDate; _iNVTakingInventoryLineWCF.UpdatedBy = _iNVTakingInventoryLine.UpdatedBy; _iNVTakingInventoryLineWCF.UpdateDate = _iNVTakingInventoryLine.UpdateDate; _iNVTakingInventoryLineWCF.IsDeleted = _iNVTakingInventoryLine.IsDeleted; _iNVTakingInventoryLineWCF.DeletedBy = _iNVTakingInventoryLine.DeletedBy; _iNVTakingInventoryLineWCF.DeleteDate = _iNVTakingInventoryLine.DeleteDate; _iNVTakingInventoryLineWCF.StockTypeID = _iNVTakingInventoryLine.StockTypeID; iNVTakingInventoryLineCollection.Add(_iNVTakingInventoryLineWCF); } return iNVTakingInventoryLineCollection; }
///<summary> ///This method will Delete the object from the database ///</summary> ///<param name="pk" type="INVStockTypePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// <returns>True if succeeded</returns> public bool Delete(INVStockTypePrimaryKey pk) { return POS.DataLayer.INVStockTypeBase.Delete(new POS.DataLayer.INVStockTypePrimaryKey(pk.StockTypeID)); }
/// <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="INVStockTypePrimaryKey">Primary Key information based on which data is to be deleted.</param> /// /// <returns>True if succeeded</returns> public bool DeleteAllByForeignKeyStockTypeID(INVStockTypePrimaryKey pk) { return POS.DataLayer.INVTakingInventoryLineBase.DeleteAllByForeignKeyStockTypeID(new POS.DataLayer.INVStockTypePrimaryKey(pk.StockTypeID)); }