コード例 #1
0
        public decimal GetUnitOngoFromLastDailyByMaketing(string mkt)
        {
            FeeMarketing findFeeMkt = this.FeeDailyMarketings.Where(m => m.MKT == mkt)
                                      .OrderByDescending(m => m.FEE_DATE)
                                      .FirstOrDefault() ?? new FeeMarketing();

            return(findFeeMkt.TOTAL_UNIT_ONGO ?? 0);
        }
コード例 #2
0
ファイル: FeeAgentDaily.cs プロジェクト: kidfox2001/KeepFile
        public FeeMarketing NewFeeMarketingByPrevious(FeeMarketing mktPrevious)
        {
            var newMkt = this.NewFeeMarketing(mktPrevious.MKT);

            newMkt.UNIT_BF             = mktPrevious.UNIT_BF;
            newMkt.UNIT_BF_BEFORE_DATE = mktPrevious.UNIT_BF;

            return(newMkt);
        }
コード例 #3
0
ファイル: FeeAgentDaily.cs プロジェクト: kidfox2001/KeepFile
        /// <summary>
        /// เพิ่ม marketing ใหม่ถ้ายังไม่มี
        /// </summary>
        /// <param name="mkt"></param>
        /// <returns></returns>
        public FeeMarketing AddjustFeeMarketingByPrevious(FeeMarketing mktPrevious)
        {
            var newMkt = this.MarketingFees.SingleOrDefault(m => m.MKT == mktPrevious.MKT);

            if (newMkt == null)
            {
                newMkt = this.NewFeeMarketingByPrevious(mktPrevious);
            }
            return(newMkt);
        }
コード例 #4
0
ファイル: FeeAgentDaily.cs プロジェクト: kidfox2001/KeepFile
        /// <summary>
        /// เพิ่มใหม่ marketing
        /// </summary>
        /// <param name="mktCode"></param>
        /// <returns></returns>
        public FeeMarketing NewFeeMarketing(string mkt)
        {
            FeeMarketing newMkt = new FeeMarketing()
            {
                FAD_ID   = this.FAD_ID,
                FUND_ID  = this.FUND_ID,
                AGENT_ID = this.AGENT_ID,
                AGENT    = this.AGENT_ID.Substring(0, 3),
                BRANCH   = this.AGENT_ID.Substring(3, 6),
                MKT      = mkt,
                FEE_DATE = this.FEE_DATE,
                FES_ID   = this.FES_ID,

                OnDateAgentFee = this
            };

            this.MarketingFees.Add(newMkt);

            return(newMkt);
        }