public ActionResult DeleteConfirmed(int id) { AllowanceMaster allowanceMaster = db.AllowanceMasters.Find(id); db.AllowanceMasters.Remove(allowanceMaster); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AllowanceId,AllowanceType,ValueMethod,AllowanceHead,AllowanceAmount,IsActive,IsCreated,CreatedDate,CustomerId")] AllowanceMaster allowanceMaster) { if (ModelState.IsValid) { db.Entry(allowanceMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(allowanceMaster)); }
public ActionResult Create([Bind(Include = "AllowanceId,AllowanceType,ValueMethod,AllowanceHead,AllowanceAmount,IsActive,IsCreated,CreatedDate")] AllowanceMaster allowanceMaster) { if (ModelState.IsValid) { db.AllowanceMasters.Add(allowanceMaster); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(allowanceMaster)); }
// GET: AllowanceMasters/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AllowanceMaster allowanceMaster = db.AllowanceMasters.Find(id); if (allowanceMaster == null) { return(HttpNotFound()); } return(View(allowanceMaster)); }
private void SetObjectInfo(AllowanceMaster _objAllowanceMaster) { _objAllowanceMaster.Allowances = txtAllowance.Text; _objAllowanceMaster.CreatedBy = Session["LoginId"].ToString(); _objAllowanceMaster.ModifiedBy = Session["LoginId"].ToString(); }