public ActionResult DeleteConfirmed(int id) { DailyCashFlow dailycashflow = db.DailyCashFlows.Find(id); db.DailyCashFlows.Remove(dailycashflow); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Date,DailyShopCost,BariKhoroch,TransportLabourCost,CompanyPayment,PublicLoanBankPayment,PublicCashIn,DailySells")] DailyCashFlow dailycashflow) { if (ModelState.IsValid) { db.Entry(dailycashflow).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dailycashflow)); }
// GET: /DailyCashFlow/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DailyCashFlow dailycashflow = db.DailyCashFlows.Find(id); if (dailycashflow == null) { return(HttpNotFound()); } return(View(dailycashflow)); }