Exemplo n.º 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            referalfamily referalfamily = await db.referalfamilies.FindAsync(id);

            db.referalfamilies.Remove(referalfamily);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        // GET: referalfamilies/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            referalfamily referalfamily = await db.referalfamilies.FindAsync(id);

            if (referalfamily == null)
            {
                return(HttpNotFound());
            }
            return(View(referalfamily));
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Edit([Bind(Include = "idreferalfamily,idfamily_FK,idcase_FK,idservice_FK,submittingdate,referalstate,referaldate,servicestate,servicestartdate,serviceenddate,referalsender_FK,senderevalution,recieverevalution,idcenter_FK,outreachnote")] referalfamily referalfamily)
        {
            if (ModelState.IsValid)
            {
                db.Entry(referalfamily).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.referalsender_FK = new SelectList(db.AspNetUsers, "Id", "Email", referalfamily.referalsender_FK);
            ViewBag.idcase_FK        = new SelectList(db.cases, "idcase", "name", referalfamily.idcase_FK);
            ViewBag.idcenter_FK      = new SelectList(db.centers, "idcenter", "name", referalfamily.idcenter_FK);
            ViewBag.idservice_FK     = new SelectList(db.services, "idservice", "name", referalfamily.idservice_FK);
            ViewBag.idfamily_FK      = new SelectList(db.families, "idfamily", "familynature", referalfamily.idfamily_FK);
            return(View(referalfamily));
        }
Exemplo n.º 4
0
        // GET: referalfamilies/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            referalfamily referalfamily = await db.referalfamilies.FindAsync(id);

            if (referalfamily == null)
            {
                return(HttpNotFound());
            }
            ViewBag.referalsender_FK = new SelectList(db.AspNetUsers, "Id", "Email", referalfamily.referalsender_FK);
            ViewBag.idcase_FK        = new SelectList(db.cases, "idcase", "name", referalfamily.idcase_FK);
            ViewBag.idcenter_FK      = new SelectList(db.centers, "idcenter", "name", referalfamily.idcenter_FK);
            ViewBag.idservice_FK     = new SelectList(db.services, "idservice", "name", referalfamily.idservice_FK);
            ViewBag.idfamily_FK      = new SelectList(db.families, "idfamily", "familynature", referalfamily.idfamily_FK);
            return(View(referalfamily));
        }