Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PaymentTypePrice paymentTypePrice = paymentTypePriceRepository.GetPaymentTypePriceByID((int)id);

            paymentTypePriceRepository.DeletePaymentTypePrice((int)id);
            paymentTypePriceRepository.Save();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "PaymentTypePriceID,Price,DateFrom,PaymentTypeID")] PaymentTypePrice paymentTypePrice)
 {
     if (ModelState.IsValid)
     {
         paymentTypePriceRepository.UpdatePaymentTypePrice(paymentTypePrice);
         paymentTypePriceRepository.Save();
         return(RedirectToAction("Index"));
     }
     ViewBag.PaymentTypeID = new SelectList(paymentTypeRepository.GetPaymentTypes(), "PaymentTypeID", "Description", paymentTypePrice.PaymentTypeID);
     return(View(paymentTypePrice));
 }
Exemple #3
0
        // GET: PaymentTypePrices/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PaymentTypePrice paymentTypePrice = paymentTypePriceRepository.GetPaymentTypePriceByID((int)id);

            if (paymentTypePrice == null)
            {
                return(HttpNotFound());
            }
            return(View(paymentTypePrice));
        }
Exemple #4
0
        // GET: PaymentTypePrices/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PaymentTypePrice paymentTypePrice = paymentTypePriceRepository.GetPaymentTypePriceByID((int)id);

            if (paymentTypePrice == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PaymentTypeID = new SelectList(paymentTypeRepository.GetPaymentTypes(), "PaymentTypeID", "Description", paymentTypePrice.PaymentTypeID);
            return(View(paymentTypePrice));
        }
 public void UpdatePaymentTypePrice(PaymentTypePrice paymentTypePrice)
 {
     context.Entry(paymentTypePrice).State = EntityState.Modified;
 }
        public void DeletePaymentTypePrice(int id)
        {
            PaymentTypePrice paymentTypePrice = context.PaymentTypePrices.Find(id);

            context.PaymentTypePrices.Remove(paymentTypePrice);
        }
 public void InsertPaymentTypePrice(PaymentTypePrice paymentTypePrice)
 {
     context.PaymentTypePrices.Add(paymentTypePrice);
 }