Ejemplo n.º 1
0
        // Added by Bharat on 12/May/2017
        public Dictionary <string, int> GetPriceList(Ctx ctx, string fields)
        {
            int M_PriceListVersion_ID       = Util.GetValueOfInt(fields);
            Dictionary <string, int> retDic = new Dictionary <string, int>();
            MPriceListVersion        ver    = new MPriceListVersion(ctx, M_PriceListVersion_ID, null);

            retDic["M_PriceList_ID"] = ver.GetM_PriceList_ID();
            MPriceList list = new MPriceList(ctx, ver.GetM_PriceList_ID(), null);

            retDic["C_Currency_ID"] = list.GetC_Currency_ID();
            return(retDic);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Process
        /// </summary>
        /// <returns>message</returns>
        protected override String DoIt()
        {
            log.Info("M_PriceList_Version_ID=" + _M_PriceList_Version_ID
                     + ", DeleteOld=" + _deleteOld);
            _plv = new MPriceListVersion(GetCtx(), _M_PriceList_Version_ID, Get_TrxName());
            if (_plv.Get_ID() == 0 || _plv.Get_ID() != _M_PriceList_Version_ID)
            {
                throw new Exception("@NotFound@  @M_PriceList_Version_ID@=" + _M_PriceList_Version_ID);
            }
            //
            String error = CheckPrerequisites();

            if (error != null && error.Length > 0)
            {
                throw new Exception(error);
            }
            return(Create());
        }