Beispiel #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            LaundryPayment laundryPayment = await db.LaundryPayments.FindAsync(id);

            db.LaundryPayments.Remove(laundryPayment);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,ClientNo,ContractNo,ReceivedAmount,ExpectedAmount,Email,Branch,TrxnDate")] LaundryPayment laundryPayment)
        {
            if (ModelState.IsValid)
            {
                db.Entry(laundryPayment).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(laundryPayment));
        }
Beispiel #3
0
        // GET: LaundryPayments/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LaundryPayment laundryPayment = await db.LaundryPayments.FindAsync(id);

            if (laundryPayment == null)
            {
                return(HttpNotFound());
            }
            return(View(laundryPayment));
        }
Beispiel #4
0
        // GET: LaundryPayments/Create
        public ActionResult Create(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var            fg     = db.LaundryManagers.Find(id);
            var            userId = User.Identity.GetUserId();
            var            user   = UserManager.FindById(userId);
            LaundryPayment ng     = new LaundryPayment()
            {
                ClientNo   = fg.ClientNo,
                ContractNo = fg.ContractNo,
                Email      = user.Email,
                TrxnDate   = DateTime.Today,
                Branch     = user.CompanyToken.Branch
            };

            if (ng == null)
            {
                return(HttpNotFound());
            }
            return(View(ng));
        }