Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AccountRange accountRange = db.AccountRanges.Find(id);

            db.AccountRanges.Remove(accountRange);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "AccountRangeID,CostCenterFrom,CostCenterTo,NaturalAccountFrom,NaturalAccountTo,Org,MasterScheduleID")] AccountRange accountRange)
 {
     if (ModelState.IsValid)
     {
         db.Entry(accountRange).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MasterScheduleID = new SelectList(db.MasterSchedules, "MasterScheduleID", "ScheduleID", accountRange.MasterScheduleID);
     return(View(accountRange));
 }
Esempio n. 3
0
        // GET: AccountRange/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AccountRange accountRange = db.AccountRanges.Find(id);

            if (accountRange == null)
            {
                return(HttpNotFound());
            }
            return(View(accountRange));
        }
Esempio n. 4
0
        // GET: AccountRange/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AccountRange accountRange = db.AccountRanges.Find(id);

            if (accountRange == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MasterScheduleID = new SelectList(db.MasterSchedules, "MasterScheduleID", "ScheduleID", accountRange.MasterScheduleID);
            return(View(accountRange));
        }
        public async Task <AccountsAndProofs> GetAccountRange(AccountRange range, CancellationToken token)
        {
            var request = new GetAccountRangeMessage()
            {
                AccountRange  = range,
                ResponseBytes = BYTES_LIMIT
            };

            AccountRangeMessage response = await SendRequest(request, _getAccountRangeRequests, token);

            Metrics.SnapGetAccountRangeSent++;

            return(new AccountsAndProofs()
            {
                PathAndAccounts = response.PathsWithAccounts, Proofs = response.Proofs
            });
        }