/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="INVAdjustStockPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVAdjustStock</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public static INVAdjustStock SelectOne(INVAdjustStockPrimaryKey pk) { DatabaseHelper oDatabaseHelper = new DatabaseHelper(); bool ExecutionState = false; // 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]); } // 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_INVAdjustStock_SelectbyPrimaryKey", ref ExecutionState); if (dr.Read()) { INVAdjustStock obj = new INVAdjustStock(); PopulateObjectFromReader(obj, dr); dr.Close(); oDatabaseHelper.Dispose(); return(obj); } else { dr.Close(); oDatabaseHelper.Dispose(); return(null); } }
/// <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="INVAdjustStockReasonPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVAdjustStockReason</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 12/27/2014 6:55:52 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public static INVAdjustStockReason SelectOneWithINVAdjustStockUsingAdjustReasonID(INVAdjustStockReasonPrimaryKey pk) { DatabaseHelper oDatabaseHelper = new DatabaseHelper(); bool ExecutionState = false; INVAdjustStockReason 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]); } // 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_INVAdjustStockReason_SelectOneWithINVAdjustStockUsingAdjustReasonID", ref ExecutionState); if (dr.Read()) { obj = new INVAdjustStockReason(); PopulateObjectFromReader(obj, dr); dr.NextResult(); //Get the child records. obj.INVAdjustStockCollectionUsingAdjustReasonID = INVAdjustStock.PopulateObjectsFromReader(dr); } dr.Close(); oDatabaseHelper.Dispose(); return(obj); }
/// <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 INVAdjustStockCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static INVAdjustStockCollection PopulateObjectsFromReader(IDataReader rdr) { INVAdjustStockCollection list = new INVAdjustStockCollection(); while (rdr.Read()) { INVAdjustStock obj = new INVAdjustStock(); PopulateObjectFromReader(obj, rdr); list.Add(obj); } return(list); }
///<summary> /// This method will update one new row into the database using the property Information /// </summary> /// /// <param name="iNVAdjustStock" type="INVAdjustStock">This INVAdjustStock will be updated in the database.</param> /// /// <returns>True if succeeded</returns> public bool Update(INVAdjustStock iNVAdjustStock) { _iNVAdjustStock = POS.DataLayer.INVAdjustStock.SelectOne(new POS.DataLayer.INVAdjustStockPrimaryKey(iNVAdjustStock.AdjustStockID)); _iNVAdjustStock.ProductID = iNVAdjustStock.ProductID; _iNVAdjustStock.BatchID = iNVAdjustStock.BatchID; _iNVAdjustStock.Qty = iNVAdjustStock.Qty; _iNVAdjustStock.AdjustReasonID = iNVAdjustStock.AdjustReasonID; _iNVAdjustStock.CreatedBy = iNVAdjustStock.CreatedBy; _iNVAdjustStock.CredateDate = iNVAdjustStock.CredateDate; _iNVAdjustStock.UpdatedBy = iNVAdjustStock.UpdatedBy; _iNVAdjustStock.UpdateDate = iNVAdjustStock.UpdateDate; return(_iNVAdjustStock.Update()); }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// /// <param name="iNVAdjustStock" type="INVAdjustStock">This INVAdjustStock will be inserted in the database.</param> /// /// <returns>True if succeeded</returns> public bool Insert(INVAdjustStock iNVAdjustStock) { _iNVAdjustStock = new POS.DataLayer.INVAdjustStock(); _iNVAdjustStock.AdjustStockID = iNVAdjustStock.AdjustStockID; _iNVAdjustStock.ProductID = iNVAdjustStock.ProductID; _iNVAdjustStock.BatchID = iNVAdjustStock.BatchID; _iNVAdjustStock.Qty = iNVAdjustStock.Qty; _iNVAdjustStock.AdjustReasonID = iNVAdjustStock.AdjustReasonID; _iNVAdjustStock.CreatedBy = iNVAdjustStock.CreatedBy; _iNVAdjustStock.CredateDate = iNVAdjustStock.CredateDate; _iNVAdjustStock.UpdatedBy = iNVAdjustStock.UpdatedBy; _iNVAdjustStock.UpdateDate = iNVAdjustStock.UpdateDate; return(_iNVAdjustStock.Insert()); }
/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="INVAdjustStockPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVAdjustStock</returns> public INVAdjustStock SelectOne(INVAdjustStockPrimaryKey pk) { _iNVAdjustStockWCF = new INVAdjustStock(); _iNVAdjustStock = POS.DataLayer.INVAdjustStockBase.SelectOne(new POS.DataLayer.INVAdjustStockPrimaryKey(pk.AdjustStockID)); _iNVAdjustStockWCF.AdjustStockID = _iNVAdjustStock.AdjustStockID; _iNVAdjustStockWCF.ProductID = _iNVAdjustStock.ProductID; _iNVAdjustStockWCF.BatchID = _iNVAdjustStock.BatchID; _iNVAdjustStockWCF.Qty = _iNVAdjustStock.Qty; _iNVAdjustStockWCF.AdjustReasonID = _iNVAdjustStock.AdjustReasonID; _iNVAdjustStockWCF.CreatedBy = _iNVAdjustStock.CreatedBy; _iNVAdjustStockWCF.CredateDate = _iNVAdjustStock.CredateDate; _iNVAdjustStockWCF.UpdatedBy = _iNVAdjustStock.UpdatedBy; _iNVAdjustStockWCF.UpdateDate = _iNVAdjustStock.UpdateDate; return(_iNVAdjustStockWCF); }
///<summary> /// This method will update one new row into the database using the property Information /// </summary> /// /// <param name="iNVAdjustStock" type="INVAdjustStock">This INVAdjustStock will be updated in the database.</param> /// /// <returns>True if succeeded</returns> public bool Update(INVAdjustStock iNVAdjustStock) { _iNVAdjustStock = POS.DataLayer.INVAdjustStock.SelectOne(new POS.DataLayer.INVAdjustStockPrimaryKey(iNVAdjustStock.AdjustStockID)); _iNVAdjustStock.ProductID = iNVAdjustStock.ProductID; _iNVAdjustStock.BatchID = iNVAdjustStock.BatchID; _iNVAdjustStock.Qty = iNVAdjustStock.Qty; _iNVAdjustStock.AdjustReasonID = iNVAdjustStock.AdjustReasonID; _iNVAdjustStock.CreatedBy = iNVAdjustStock.CreatedBy; _iNVAdjustStock.CredateDate = iNVAdjustStock.CredateDate; _iNVAdjustStock.UpdatedBy = iNVAdjustStock.UpdatedBy; _iNVAdjustStock.UpdateDate = iNVAdjustStock.UpdateDate; _iNVAdjustStock.StockTypeID = iNVAdjustStock.StockTypeID; _iNVAdjustStock.OldStockTypeID = iNVAdjustStock.OldStockTypeID; _iNVAdjustStock.InventoryID = iNVAdjustStock.InventoryID; _iNVAdjustStock.ExpiryDate = iNVAdjustStock.ExpiryDate; _iNVAdjustStock.BatchNumber = iNVAdjustStock.BatchNumber; return(_iNVAdjustStock.Update()); }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// /// <param name="iNVAdjustStock" type="INVAdjustStock">This INVAdjustStock will be inserted in the database.</param> /// /// <returns>True if succeeded</returns> public bool Insert(INVAdjustStock iNVAdjustStock) { _iNVAdjustStock = new POS.DataLayer.INVAdjustStock(); _iNVAdjustStock.AdjustStockID = iNVAdjustStock.AdjustStockID; _iNVAdjustStock.ProductID = iNVAdjustStock.ProductID; _iNVAdjustStock.BatchID = iNVAdjustStock.BatchID; _iNVAdjustStock.Qty = iNVAdjustStock.Qty; _iNVAdjustStock.AdjustReasonID = iNVAdjustStock.AdjustReasonID; _iNVAdjustStock.CreatedBy = iNVAdjustStock.CreatedBy; _iNVAdjustStock.CredateDate = iNVAdjustStock.CredateDate; _iNVAdjustStock.UpdatedBy = iNVAdjustStock.UpdatedBy; _iNVAdjustStock.UpdateDate = iNVAdjustStock.UpdateDate; _iNVAdjustStock.StockTypeID = iNVAdjustStock.StockTypeID; _iNVAdjustStock.OldStockTypeID = iNVAdjustStock.OldStockTypeID; _iNVAdjustStock.InventoryID = iNVAdjustStock.InventoryID; _iNVAdjustStock.ExpiryDate = iNVAdjustStock.ExpiryDate; _iNVAdjustStock.BatchNumber = iNVAdjustStock.BatchNumber; return(_iNVAdjustStock.Insert()); }
/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="INVAdjustStockPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVAdjustStock</returns> public INVAdjustStock SelectOne(INVAdjustStockPrimaryKey pk) { _iNVAdjustStockWCF = new INVAdjustStock(); _iNVAdjustStock = POS.DataLayer.INVAdjustStockBase.SelectOne(new POS.DataLayer.INVAdjustStockPrimaryKey(pk.AdjustStockID)); _iNVAdjustStockWCF.AdjustStockID = _iNVAdjustStock.AdjustStockID; _iNVAdjustStockWCF.ProductID = _iNVAdjustStock.ProductID; _iNVAdjustStockWCF.BatchID = _iNVAdjustStock.BatchID; _iNVAdjustStockWCF.Qty = _iNVAdjustStock.Qty; _iNVAdjustStockWCF.AdjustReasonID = _iNVAdjustStock.AdjustReasonID; _iNVAdjustStockWCF.CreatedBy = _iNVAdjustStock.CreatedBy; _iNVAdjustStockWCF.CredateDate = _iNVAdjustStock.CredateDate; _iNVAdjustStockWCF.UpdatedBy = _iNVAdjustStock.UpdatedBy; _iNVAdjustStockWCF.UpdateDate = _iNVAdjustStock.UpdateDate; _iNVAdjustStockWCF.StockTypeID = _iNVAdjustStock.StockTypeID; _iNVAdjustStockWCF.OldStockTypeID = _iNVAdjustStock.OldStockTypeID; _iNVAdjustStockWCF.InventoryID = _iNVAdjustStock.InventoryID; _iNVAdjustStockWCF.ExpiryDate = _iNVAdjustStock.ExpiryDate; _iNVAdjustStockWCF.BatchNumber = _iNVAdjustStock.BatchNumber; return _iNVAdjustStockWCF; }
/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="INVAdjustStockPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVAdjustStock</returns> public INVAdjustStock SelectOne(INVAdjustStockPrimaryKey pk) { _iNVAdjustStockWCF = new INVAdjustStock(); _iNVAdjustStock = POS.DataLayer.INVAdjustStockBase.SelectOne(new POS.DataLayer.INVAdjustStockPrimaryKey(pk.AdjustStockID)); _iNVAdjustStockWCF.AdjustStockID = _iNVAdjustStock.AdjustStockID; _iNVAdjustStockWCF.ProductID = _iNVAdjustStock.ProductID; _iNVAdjustStockWCF.BatchID = _iNVAdjustStock.BatchID; _iNVAdjustStockWCF.Qty = _iNVAdjustStock.Qty; _iNVAdjustStockWCF.AdjustReasonID = _iNVAdjustStock.AdjustReasonID; _iNVAdjustStockWCF.CreatedBy = _iNVAdjustStock.CreatedBy; _iNVAdjustStockWCF.CredateDate = _iNVAdjustStock.CredateDate; _iNVAdjustStockWCF.UpdatedBy = _iNVAdjustStock.UpdatedBy; _iNVAdjustStockWCF.UpdateDate = _iNVAdjustStock.UpdateDate; _iNVAdjustStockWCF.StockTypeID = _iNVAdjustStock.StockTypeID; _iNVAdjustStockWCF.OldStockTypeID = _iNVAdjustStock.OldStockTypeID; _iNVAdjustStockWCF.InventoryID = _iNVAdjustStock.InventoryID; _iNVAdjustStockWCF.ExpiryDate = _iNVAdjustStock.ExpiryDate; _iNVAdjustStockWCF.BatchNumber = _iNVAdjustStock.BatchNumber; return(_iNVAdjustStockWCF); }
/// <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 INVAdjustStockCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static INVAdjustStockCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { INVAdjustStockCollection list = new INVAdjustStockCollection(); if (rdr.Read()) { INVAdjustStock obj = new INVAdjustStock(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new INVAdjustStock(); PopulateObjectFromReader(obj, rdr); list.Add(obj); } oDatabaseHelper.Dispose(); return(list); } else { oDatabaseHelper.Dispose(); return(null); } }
private bool InsertDetailsAndCommit(DatabaseHelper oDatabaseHelper, INVAdjustStock adjustStock) { bool ExecutionState = false; // Pass the value of '_TransferHeaderID' as parameter 'TransferHeaderID' of the stored procedure. if (adjustStock.ProductID != null) { oDatabaseHelper.AddParameter("@ProductID", adjustStock.ProductID); } else { oDatabaseHelper.AddParameter("@ProductID", DBNull.Value); } // Pass the value of '_productID' as parameter 'ProductID' of the stored procedure. if (adjustStock.StockTypeID != null) { oDatabaseHelper.AddParameter("@StockTypeID", adjustStock.StockTypeID); } else { oDatabaseHelper.AddParameter("@StockTypeID", DBNull.Value); } // Pass the value of '_Qty' as parameter 'Qty' of the stored procedure. if (adjustStock.InventoryID != null) { oDatabaseHelper.AddParameter("@InventoryID", adjustStock.InventoryID); } else { oDatabaseHelper.AddParameter("@InventoryID", DBNull.Value); } // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. if (adjustStock.CreatedBy != null) { oDatabaseHelper.AddParameter("@CreatedBy", adjustStock.CreatedBy); } else { oDatabaseHelper.AddParameter("@CreatedBy", DBNull.Value); } // Pass the value of '_createDate' as parameter 'CreateDate' of the stored procedure. if (adjustStock.Qty != null) { oDatabaseHelper.AddParameter("@BatchQty", adjustStock.Qty); } else { oDatabaseHelper.AddParameter("@BatchQty", DBNull.Value); } // Pass the value of '_updatedBy' as parameter 'UpdatedBy' of the stored procedure. if (!string.IsNullOrEmpty(adjustStock.BatchNumber)) { oDatabaseHelper.AddParameter("@BatchNumber", adjustStock.BatchNumber); } else { oDatabaseHelper.AddParameter("@BatchNumber", DBNull.Value); } // Pass the value of '_updateDate' as parameter 'UpdateDate' of the stored procedure. if (adjustStock.ExpiryDate != null) { oDatabaseHelper.AddParameter("@ExpiryDate", adjustStock.ExpiryDate); } else { oDatabaseHelper.AddParameter("@ExpiryDate", DBNull.Value); } oDatabaseHelper.ExecuteScalar("usp_INVInventory_AddQtyToInventory", CommandType.StoredProcedure, ConnectionState.KeepOpen, ref ExecutionState); return(ExecutionState); }
/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="INVAdjustStockPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class INVAdjustStock</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public static INVAdjustStock SelectOne(INVAdjustStockPrimaryKey pk) { DatabaseHelper oDatabaseHelper = new DatabaseHelper(); bool ExecutionState = false; // 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] ); } // 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_INVAdjustStock_SelectbyPrimaryKey", ref ExecutionState); if (dr.Read()) { INVAdjustStock obj=new INVAdjustStock(); PopulateObjectFromReader(obj,dr); dr.Close(); oDatabaseHelper.Dispose(); return obj; } else { dr.Close(); oDatabaseHelper.Dispose(); return null; } }
/// <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 INVAdjustStockCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static INVAdjustStockCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { INVAdjustStockCollection list = new INVAdjustStockCollection(); if (rdr.Read()) { INVAdjustStock obj = new INVAdjustStock(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new INVAdjustStock(); PopulateObjectFromReader(obj, rdr); list.Add(obj); } oDatabaseHelper.Dispose(); return list; } else { oDatabaseHelper.Dispose(); return null; } }
/// <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 INVAdjustStockCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static INVAdjustStockCollection PopulateObjectsFromReader(IDataReader rdr) { INVAdjustStockCollection list = new INVAdjustStockCollection(); while (rdr.Read()) { INVAdjustStock obj = new INVAdjustStock(); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }
private bool InsertDetailsAndCommit(DatabaseHelper oDatabaseHelper, INVAdjustStock adjustStock) { bool ExecutionState = false; // Pass the value of '_TransferHeaderID' as parameter 'TransferHeaderID' of the stored procedure. if (adjustStock.ProductID != null) oDatabaseHelper.AddParameter("@ProductID", adjustStock.ProductID); else oDatabaseHelper.AddParameter("@ProductID", DBNull.Value); // Pass the value of '_productID' as parameter 'ProductID' of the stored procedure. if (adjustStock.StockTypeID != null) oDatabaseHelper.AddParameter("@StockTypeID", adjustStock.StockTypeID); else oDatabaseHelper.AddParameter("@StockTypeID", DBNull.Value); // Pass the value of '_Qty' as parameter 'Qty' of the stored procedure. if (adjustStock.InventoryID != null) oDatabaseHelper.AddParameter("@InventoryID", adjustStock.InventoryID); else oDatabaseHelper.AddParameter("@InventoryID", DBNull.Value); // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. if (adjustStock.CreatedBy != null) oDatabaseHelper.AddParameter("@CreatedBy", adjustStock.CreatedBy); else oDatabaseHelper.AddParameter("@CreatedBy", DBNull.Value); // Pass the value of '_createDate' as parameter 'CreateDate' of the stored procedure. if (adjustStock.Qty != null) oDatabaseHelper.AddParameter("@BatchQty", adjustStock.Qty); else oDatabaseHelper.AddParameter("@BatchQty", DBNull.Value); // Pass the value of '_updatedBy' as parameter 'UpdatedBy' of the stored procedure. if (!string.IsNullOrEmpty(adjustStock.BatchNumber)) oDatabaseHelper.AddParameter("@BatchNumber", adjustStock.BatchNumber); else oDatabaseHelper.AddParameter("@BatchNumber", DBNull.Value); // Pass the value of '_updateDate' as parameter 'UpdateDate' of the stored procedure. if (adjustStock.ExpiryDate != null) oDatabaseHelper.AddParameter("@ExpiryDate", adjustStock.ExpiryDate); else oDatabaseHelper.AddParameter("@ExpiryDate", DBNull.Value); oDatabaseHelper.ExecuteScalar("usp_INVInventory_AddQtyToInventory", CommandType.StoredProcedure, ConnectionState.KeepOpen, ref ExecutionState); return ExecutionState; }
///<summary> /// This method will update one new row into the database using the property Information /// </summary> /// /// <param name="iNVAdjustStock" type="INVAdjustStock">This INVAdjustStock will be updated in the database.</param> /// /// <returns>True if succeeded</returns> public bool Update(INVAdjustStock iNVAdjustStock) { _iNVAdjustStock=POS.DataLayer.INVAdjustStock.SelectOne(new POS.DataLayer.INVAdjustStockPrimaryKey(iNVAdjustStock.AdjustStockID)); _iNVAdjustStock.ProductID=iNVAdjustStock.ProductID; _iNVAdjustStock.BatchID=iNVAdjustStock.BatchID; _iNVAdjustStock.Qty=iNVAdjustStock.Qty; _iNVAdjustStock.AdjustReasonID=iNVAdjustStock.AdjustReasonID; _iNVAdjustStock.CreatedBy=iNVAdjustStock.CreatedBy; _iNVAdjustStock.CredateDate=iNVAdjustStock.CredateDate; _iNVAdjustStock.UpdatedBy=iNVAdjustStock.UpdatedBy; _iNVAdjustStock.UpdateDate=iNVAdjustStock.UpdateDate; _iNVAdjustStock.StockTypeID=iNVAdjustStock.StockTypeID; _iNVAdjustStock.OldStockTypeID=iNVAdjustStock.OldStockTypeID; _iNVAdjustStock.InventoryID=iNVAdjustStock.InventoryID; _iNVAdjustStock.ExpiryDate=iNVAdjustStock.ExpiryDate; _iNVAdjustStock.BatchNumber=iNVAdjustStock.BatchNumber; return _iNVAdjustStock.Update(); }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// /// <param name="iNVAdjustStock" type="INVAdjustStock">This INVAdjustStock will be inserted in the database.</param> /// /// <returns>True if succeeded</returns> public bool Insert(INVAdjustStock iNVAdjustStock) { _iNVAdjustStock = new POS.DataLayer.INVAdjustStock(); _iNVAdjustStock.AdjustStockID=iNVAdjustStock.AdjustStockID; _iNVAdjustStock.ProductID=iNVAdjustStock.ProductID; _iNVAdjustStock.BatchID=iNVAdjustStock.BatchID; _iNVAdjustStock.Qty=iNVAdjustStock.Qty; _iNVAdjustStock.AdjustReasonID=iNVAdjustStock.AdjustReasonID; _iNVAdjustStock.CreatedBy=iNVAdjustStock.CreatedBy; _iNVAdjustStock.CredateDate=iNVAdjustStock.CredateDate; _iNVAdjustStock.UpdatedBy=iNVAdjustStock.UpdatedBy; _iNVAdjustStock.UpdateDate=iNVAdjustStock.UpdateDate; _iNVAdjustStock.StockTypeID=iNVAdjustStock.StockTypeID; _iNVAdjustStock.OldStockTypeID=iNVAdjustStock.OldStockTypeID; _iNVAdjustStock.InventoryID=iNVAdjustStock.InventoryID; _iNVAdjustStock.ExpiryDate=iNVAdjustStock.ExpiryDate; _iNVAdjustStock.BatchNumber=iNVAdjustStock.BatchNumber; return _iNVAdjustStock.Insert(); }