Exemple #1
0
        public int AddNewStockTaking(object pobjStockTakingMasterVO, DataSet pdstData)
        {
            IV_StockTakingMasterVO voStockTakingMaster = (IV_StockTakingMasterVO)pobjStockTakingMasterVO;
            //Update StockTakingPeriod
            IV_StockTakingMasterDS dsStockTakingMaster = new IV_StockTakingMasterDS();

            voStockTakingMaster.StockTakingMasterID = dsStockTakingMaster.AddAndReturnID(voStockTakingMaster);
            //Set value for StockTakingPeriodID column in the dataset
            foreach (DataRow drow in pdstData.Tables[IV_StockTakingTable.TABLE_NAME].Rows)
            {
                if (drow.RowState == DataRowState.Deleted)
                {
                    continue;
                }
                drow[IV_StockTakingTable.STOCKTAKINGMASTERID_FLD] = voStockTakingMaster.StockTakingMasterID;
            }
            //update Stock Taking
            IV_StockTakingDS dsStockTaking = new IV_StockTakingDS();

            dsStockTaking.UpdateDataSet(pdstData);
            return(voStockTakingMaster.StockTakingMasterID);
        }
Exemple #2
0
        /// <summary>
        /// UpdateStockTaking
        /// </summary>
        /// <param name="pobjStockTakingMasterVO"></param>
        /// <author>Trada</author>
        /// <date>Tuesday, July 25 2006</date>

        public void UpdateStockTaking(object pobjStockTakingMasterVO, DataSet pdstData)
        {
            IV_StockTakingMasterVO voStockTakingMaster = (IV_StockTakingMasterVO)pobjStockTakingMasterVO;
            //Update StockTakingPeriod
            IV_StockTakingMasterDS dsStockTakingMaster = new IV_StockTakingMasterDS();

            dsStockTakingMaster.Update(voStockTakingMaster);
            pdstData.Tables[1].TableName = "IV_StockTaking";
            //Set value for StockTakingPeriodID column in the dataset
            foreach (DataRow drow in pdstData.Tables["IV_StockTaking"].Rows)
            {
                if (drow.RowState == DataRowState.Deleted)
                {
                    continue;
                }
                drow[IV_StockTakingTable.STOCKTAKINGMASTERID_FLD] = voStockTakingMaster.StockTakingMasterID;
            }
            //update Stock Taking
            IV_StockTakingDS dsStockTaking = new IV_StockTakingDS();

            dsStockTaking.UpdateDataSet(pdstData);
        }