public ActionResult DeleteConfirmed(int id)
        {
            HisProfileIncharge hisProfileIncharge = db.HisProfileIncharges.Find(id);

            db.HisProfileIncharges.Remove(hisProfileIncharge);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,HisProfileId,HisInchargeId")] HisProfileIncharge hisProfileIncharge)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hisProfileIncharge).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.HisProfileId  = new SelectList(db.HisProfiles, "Id", "Name", hisProfileIncharge.HisProfileId);
     ViewBag.HisInchargeId = new SelectList(db.HisIncharges, "Id", "Name", hisProfileIncharge.HisInchargeId);
     return(View(hisProfileIncharge));
 }
        public ActionResult Create([Bind(Include = "Id,HisProfileId,HisInchargeId")] HisProfileIncharge hisProfileIncharge)
        {
            if (ModelState.IsValid)
            {
                db.HisProfileIncharges.Add(hisProfileIncharge);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.HisProfileId  = new SelectList(db.HisProfiles, "Id", "Name", hisProfileIncharge.HisProfileId);
            ViewBag.HisInchargeId = new SelectList(db.HisIncharges, "Id", "Name", hisProfileIncharge.HisInchargeId);
            return(View(hisProfileIncharge));
        }
        // GET: HIS10/HisProfileIncharges/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HisProfileIncharge hisProfileIncharge = db.HisProfileIncharges.Find(id);

            if (hisProfileIncharge == null)
            {
                return(HttpNotFound());
            }
            return(View(hisProfileIncharge));
        }
        // GET: HIS10/HisProfileIncharges/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HisProfileIncharge hisProfileIncharge = db.HisProfileIncharges.Find(id);

            if (hisProfileIncharge == null)
            {
                return(HttpNotFound());
            }
            ViewBag.HisProfileId  = new SelectList(db.HisProfiles, "Id", "Name", hisProfileIncharge.HisProfileId);
            ViewBag.HisInchargeId = new SelectList(db.HisIncharges, "Id", "Name", hisProfileIncharge.HisInchargeId);
            return(View(hisProfileIncharge));
        }