コード例 #1
0
        }   //  prepare

        /// <summary>
        /// doit
        /// </summary>
        /// <returns>info</returns>
        protected override string DoIt()
        {
            if (_AD_Table_ID != null && int.Parse(_AD_Table_ID.ToString()) > 0)
            {
                MPrintFormat pf = MPrintFormat.CreateFromTable(GetCtx(), int.Parse(_AD_Table_ID.ToString()), GetRecord_ID());
                AddLog(Utility.Util.GetValueOfInt(_AD_Table_ID.ToString()), null, pf.GetItemCount(), pf.GetName());
                return(pf.GetName() + " #" + pf.GetItemCount());
            }
            else if (_AD_PrintFormat_ID != null && _AD_PrintFormat_ID > 0)
            {
                MPrintFormat pf = MPrintFormat.Copy(GetCtx(), Utility.Util.GetValueOfInt(_AD_PrintFormat_ID.ToString()), GetRecord_ID());
                AddLog(Utility.Util.GetValueOfInt(_AD_PrintFormat_ID.ToString()), null, pf.GetItemCount(), pf.GetName());
                return(pf.GetName() + " #" + pf.GetItemCount());
            }
            else
            {
                throw new Exception(msgInvalidArguments);
            }
        }
コード例 #2
0
ファイル: AReport.cs プロジェクト: vuongthai91/ERP-CMR-DMS
        /// <summary>
        /// Creates the new format
        /// </summary>
        /// <param name="AD_Table_ID">table id</param>
        private void CreateNewFormat(int AD_Table_ID)
        {
            MPrintFormat pf = MPrintFormat.CreateFromTable(Env.GetContext(), AD_Table_ID);

            LaunchReport(pf);
        }       //	createNewFormat