コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DebtorTransactionFile debtorTransactionFile = db.DebtorTransactionFiles.Find(id);

            db.DebtorTransactionFiles.Remove(debtorTransactionFile);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "DbTransactionId,DocumentNo,AccountCode,Date,TransactionType,GrossTransactionValue,VatValue")] DebtorTransactionFile debtorTransactionFile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(debtorTransactionFile).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AccountCode = new SelectList(db.DebtorsMasters, "DebtorId", "Address1", debtorTransactionFile.AccountCode);
     return(View(debtorTransactionFile));
 }
コード例 #3
0
        // GET: DebtorTransactionFiles/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DebtorTransactionFile debtorTransactionFile = db.DebtorTransactionFiles.Find(id);

            if (debtorTransactionFile == null)
            {
                return(HttpNotFound());
            }
            return(View(debtorTransactionFile));
        }
コード例 #4
0
        // GET: DebtorTransactionFiles/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DebtorTransactionFile debtorTransactionFile = db.DebtorTransactionFiles.Find(id);

            if (debtorTransactionFile == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AccountCode = new SelectList(db.DebtorsMasters, "DebtorId", "Address1", debtorTransactionFile.AccountCode);
            return(View(debtorTransactionFile));
        }