Exemplo n.º 1
0
        public void Add(IPQuoteItemAmountsModel iPQuoteItemAmountsModel)
        {
            if (iPQuoteItemAmountsModel == null)
            {
                //throw new ArgumentNullException(nameof(iPQuoteItemAmountsModel));
            }

            ip_quote_item_amounts ipQuoteItemAmountsDB = Mapper.Map(iPQuoteItemAmountsModel, new ip_quote_item_amounts());

            AMDSystemsEntities.ip_quote_item_amounts.Add(ipQuoteItemAmountsDB);
            AMDSystemsEntities.SaveChanges();
        }
Exemplo n.º 2
0
        public static IPQuoteItemAmountsModel Convert(ip_quote_item_amounts ipQuoteItemAmountsDB)
        {
            if (ipQuoteItemAmountsDB == null)
            {
                //throw new ArgumentNullException(nameof(ipQuoteItemAmountsDB));
            }

            return(new IPQuoteItemAmountsModel()
            {
                item_amount_id = ipQuoteItemAmountsDB.item_amount_id,
                item_discount = ipQuoteItemAmountsDB.item_discount,
                item_id = ipQuoteItemAmountsDB.item_id,
                item_subtotal = ipQuoteItemAmountsDB.item_subtotal,
                item_tax_total = ipQuoteItemAmountsDB.item_tax_total,
                item_total = ipQuoteItemAmountsDB.item_total
            });
        }
Exemplo n.º 3
0
        public static ip_quote_item_amounts Map(IPQuoteItemAmountsModel iPQuoteItemAmountsModel, ip_quote_item_amounts ipQuoteItemAmountsDB)
        {
            if (iPQuoteItemAmountsModel == null)
            {
                //throw new ArgumentNullException(nameof(iPQuoteItemAmountsModel));
            }

            if (ipQuoteItemAmountsDB == null)
            {
                //throw new ArgumentNullException(nameof(ipQuoteItemAmountsDB));
            }

            ipQuoteItemAmountsDB.item_discount  = iPQuoteItemAmountsModel.item_discount;
            ipQuoteItemAmountsDB.item_id        = iPQuoteItemAmountsModel.item_id;
            ipQuoteItemAmountsDB.item_subtotal  = iPQuoteItemAmountsModel.item_subtotal;
            ipQuoteItemAmountsDB.item_tax_total = iPQuoteItemAmountsModel.item_tax_total;
            ipQuoteItemAmountsDB.item_total     = iPQuoteItemAmountsModel.item_total;

            return(ipQuoteItemAmountsDB);
        }