예제 #1
0
        private void DefineAdditionalCosts()
        {
            var temp = new RFQCostingChild(AdditionalCostList ?? (new ObservableCollection <tbl_PurchaseOrder_AdditionalCost>()));

            temp.SubmitCosts += (s, e) =>
            {
                AdditionalCostList = new ObservableCollection <tbl_PurchaseOrder_AdditionalCost>
                                     (
                    e.AdditionalCostList.Select
                        (poCosts => Iserial != null ? new tbl_PurchaseOrder_AdditionalCost
                {
                    CostType              = poCosts.CostType,
                    CostValue             = poCosts.CostValue,
                    Currency              = poCosts.Currency,
                    ExchangeRate          = float.Parse(poCosts.ExchangeRate.ToString()),
                    Iserial               = poCosts.Iserial,
                    LocalValue            = poCosts.LocalValue,
                    ParentPurchLineSerial = (int)Iserial
                } : new tbl_PurchaseOrder_AdditionalCost
                {
                    CostType     = poCosts.CostType,
                    CostValue    = poCosts.CostValue,
                    Currency     = poCosts.Currency,
                    ExchangeRate = float.Parse(poCosts.ExchangeRate.ToString()),
                    Iserial      = poCosts.Iserial,
                    LocalValue   = poCosts.LocalValue
                }
                        )
                                     );
                AdditionalCost = ParentRfqSub.Qty != 0 ? (e.TotalocalValue / ParentRfqSub.Qty) : 0;
            };
            temp.Show();
        }
예제 #2
0
        private void ShowCostingDetails()
        {
            var temp = new RFQCostingChild(AdditionalCostList ?? (new ObservableCollection <tbl_RFQ_AdditionalCost>()));

            temp.SubmitCosts += (s, e) =>
            {
                AdditionalCostList = e.AdditionalCostList;
                AdditionalCost     = Parent.Qty == 0 ? 0 : (e.TotalocalValue / Parent.Qty);
            };
            temp.Show();
        }