Ejemplo n.º 1
0
        /// <summary>
        /// Get Currency Code
        /// </summary>
        /// <param name="pintCurencyID"></param>
        /// <returns></returns>

        public string GetInventorCode(int pintInventorID)
        {
            try
            {
                MST_PartyVO voParty = (MST_PartyVO)(new MST_PartyDS()).GetObjectVO(pintInventorID);
                if (voParty != null)
                {
                    return(voParty.Code);
                }

                return(string.Empty);
            }
            catch (PCSDBException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        //**************************************************************************
        ///    <Description>
        ///       This method uses to delete MST_Party
        ///    </Description>
        ///    <Inputs>
        ///        MST_PartyVO
        ///    </Inputs>
        ///    <Outputs>
        ///       N/A
        ///    </Outputs>
        ///    <Returns>
        ///       N/A
        ///    </Returns>
        ///    <Authors>
        ///       DungLa
        ///    </Authors>
        ///    <History>
        ///       04-Mar-2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************

        public void Delete(object pObjectVO)
        {
            try
            {
                MST_PartyVO voParty = (MST_PartyVO)pObjectVO;
                // delete all contact first
                MST_PartyContactDS dsContact = new MST_PartyContactDS();
                dsContact.DeleteByParty(voParty.PartyID);
                // then delete all location
                MST_PartyLocationDS dsLocation = new MST_PartyLocationDS();
                dsLocation.DeleteByParty(voParty.PartyID);
                // finally delete Party
                MST_PartyDS dsParty = new MST_PartyDS();
                dsParty.Delete(voParty.PartyID);
            }
            catch (PCSException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }