Ejemplo n.º 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            Profiles_Library profiles_Library = await db.Profiles_Library.FindAsync(id);

            db.Profiles_Library.Remove(profiles_Library);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Firstname,Lastname,Company,Email,Phonenumber,PL_Status")] Profiles_Library profiles_Library)
        {
            if (ModelState.IsValid)
            {
                db.Entry(profiles_Library).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(profiles_Library));
        }
Ejemplo n.º 3
0
        // GET: Profiles_Library/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Profiles_Library profiles_Library = await db.Profiles_Library.FindAsync(id);

            if (profiles_Library == null)
            {
                return(HttpNotFound());
            }
            return(View(profiles_Library));
        }
Ejemplo n.º 4
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Firstname,Lastname,Company,Email,Phonenumber,PL_Status")] Profiles_Library profiles_Library)
        {
            if (ModelState.IsValid)
            {
                profiles_Library.Profile_ID = (int)Session["Id"];
                profiles_Library.PL_Status  = "Active";
                db.Profiles_Library.Add(profiles_Library);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(profiles_Library));
        }