Example #1
0
        /// <summary>
        /// Delete record by condition
        /// </summary>

        public void Delete(object pObjectVO)
        {
            CST_ActualCostHistoryDS       dsActualCost = new CST_ActualCostHistoryDS();
            CST_ActCostAllocationMasterVO voPeriod     = (CST_ActCostAllocationMasterVO)pObjectVO;

            dsActualCost.Delete(voPeriod.ActCostAllocationMasterID);
        }
Example #2
0
        public void SaveData(DataSet pdstData, object pobjPeriod)
        {
            CST_ActCostAllocationMasterVO voPeriod = (CST_ActCostAllocationMasterVO)pobjPeriod;
            // delete old cost first
            CST_ActualCostHistoryDS dsActualCost = new CST_ActualCostHistoryDS();

            try
            {
                dsActualCost.Delete(voPeriod.ActCostAllocationMasterID);
            }
            catch
            {
                throw new PCSBOException(ErrorCode.MESSAGE_CAN_NOT_DELETE, "SaveData", null);
            }
            // update actual cost
            dsActualCost.UpdateDataSet(pdstData);
            // update period rollupdate
            CST_ActCostAllocationMasterDS dsPeriod = new CST_ActCostAllocationMasterDS();

            dsPeriod.Update(pobjPeriod);
        }