コード例 #1
0
        public void updateTrasnaction(TB_Transaction tx)
        {
            TB_Transaction old = entities.TB_Transaction.Where(x => x.TransactionId == tx.TransactionId).FirstOrDefault();

            old.Status     = tx.Status;
            old.ResponseId = tx.ResponseId;
            entities.SaveChanges();
        }
コード例 #2
0
        public TB_Transaction createTransaction(string txnNumber, string amount, int?userid, int productid, string phone)
        {
            TB_Transaction tx = new TB_Transaction();

            tx.TransactionNumber = txnNumber;
            tx.Phone             = phone;
            tx.UserId            = userid;
            tx.Denomination      = amount;
            tx.ProductId         = productid;
            tx.date = DateTime.Now;
            entities.TB_Transaction.Add(tx);
            entities.SaveChanges();
            return(tx);
        }