示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AllowanceMaster allowanceMaster = db.AllowanceMasters.Find(id);

            db.AllowanceMasters.Remove(allowanceMaster);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 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));
        }
示例#4
0
        // 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));
        }
示例#5
0
 private void SetObjectInfo(AllowanceMaster _objAllowanceMaster)
 {
     _objAllowanceMaster.Allowances = txtAllowance.Text;
     _objAllowanceMaster.CreatedBy  = Session["LoginId"].ToString();
     _objAllowanceMaster.ModifiedBy = Session["LoginId"].ToString();
 }