Exemplo n.º 1
0
        /// <summary>
        /// Update Master object and update detail dataset
        /// </summary>

        public void Update(object pobjMaster, DataSet pdstDetails)
        {
            STD_CostCenterRateMasterDS dsMaster = new STD_CostCenterRateMasterDS();

            // update master
            dsMaster.Update(pobjMaster);

            // update detail
            STD_CostCenterRateDetailDS dsDetail = new STD_CostCenterRateDetailDS();

            dsDetail.UpdateDataSet(pdstDetails);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Delete record by condition
        /// </summary>

        public void Delete(object pObjectVO)
        {
            STD_CostCenterRateMasterVO voMaster = (STD_CostCenterRateMasterVO)pObjectVO;
            // delete detail first
            STD_CostCenterRateDetailDS dsDetail = new STD_CostCenterRateDetailDS();

            dsDetail.Delete(voMaster.CostCenterRateMasterID);
            // delete master
            STD_CostCenterRateMasterDS dsMaster = new STD_CostCenterRateMasterDS();

            dsMaster.Delete(voMaster.CostCenterRateMasterID);
        }
Exemplo n.º 3
0
        public int AddAndReturnID(object pobjMaster, DataSet pdstDetail)
        {
            STD_CostCenterRateMasterDS dsMaster = new STD_CostCenterRateMasterDS();
            // save master object first and get new id
            int intNewID = dsMaster.AddAndReturnID(pobjMaster);

            // now assign new id to detail data
            foreach (DataRow drowData in pdstDetail.Tables[0].Rows)
            {
                if (drowData.RowState != DataRowState.Deleted)
                {
                    drowData[STD_CostCenterRateDetailTable.COSTCENTERRATEMASTERID_FLD] = intNewID;
                }
            }
            // update detail data
            STD_CostCenterRateDetailDS dsDetail = new STD_CostCenterRateDetailDS();

            dsDetail.UpdateDataSet(pdstDetail);

            // return master id to client
            return(intNewID);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get the object information by ID of VO class
        /// </summary>

        public object GetObjectVO(int pintID, string VOclass)
        {
            STD_CostCenterRateMasterDS dsMaster = new STD_CostCenterRateMasterDS();

            return(dsMaster.GetObjectVO(pintID));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Gets cost of all item from cost center rate
        /// </summary>
        /// <param name="pintCCNID">CCN</param>
        /// <returns></returns>

        public DataTable GetCostFromCostCenter(int pintCCNID)
        {
            STD_CostCenterRateMasterDS dsRateMaster = new STD_CostCenterRateMasterDS();

            return(dsRateMaster.GetCostFromCostCenterRate(pintCCNID));
        }