Exemplo n.º 1
0
        public ActionResult ProjectFinancials(int OpportunityID, int BOMID)
        {
            BOMFinancialReviewModel   FM  = new BOMFinancialReviewModel();
            DL_BOMFinancialReiewModel DFM = new DL_BOMFinancialReiewModel();
            QuoteBusinessLogic        BL  = new QuoteBusinessLogic();

            DFM = BL.GetAssemblyForBOMByOpportunityID(OpportunityID, BOMID);
            FM  = PopulateFinanceReviewViewModel(DFM);

            return(PartialView(FM));
        }
Exemplo n.º 2
0
        private BOMFinancialReviewModel PopulateFinanceReviewViewModel(DL_BOMFinancialReiewModel Assembly)
        {
            BOMFinancialReviewModel    bl = new BOMFinancialReviewModel();
            List <FinancialBOMAssemly> fa = new List <FinancialBOMAssemly>();


            if (Assembly.BOMAssembly.Count > 0)
            {
                bl.FinalAgreedPrice = Assembly.FinalAgreedPrice;
                bl.BOMTotal         = Assembly.BOMTotal;
                bl.CTOCerials       = Assembly.CTOCerials;
                bl.QuoteNo          = Assembly.QuoteNo;
                bl.Deposit          = Assembly.Deposit;
                bl.PreDelivery      = Assembly.PreDelivery;
                bl.Final            = Assembly.Final;
                bl.PONumber         = Assembly.PONumber;
                bl.DepositPerc      = Assembly.DepositPerc;
                bl.PreDeliveryPerc  = Assembly.PreDeliveryPerc;
                bl.FinalPerc        = Assembly.FinalPerc;
                bl.BOMID            = Assembly.BOMID;
                bl.OpportunityID    = Assembly.OpportunityID;

                foreach (var item in Assembly.BOMAssembly)
                {
                    FinancialBOMAssemly b = new FinancialBOMAssemly();
                    b.AssemblyCode = item.AssemblyCode;
                    b.Area         = item.Area;
                    b.Category     = item.Category;
                    b.Device       = item.Device;
                    b.Revenue      = item.Revenue;
                    b.Qty          = item.Qty;

                    fa.Add(b);
                }
                bl.BOMAssemly = fa;
            }
            return(bl);
        }