Esempio n. 1
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            Company_Profiles company_Profiles = db.Company_Profiles.Find(id);

            db.Company_Profiles.Remove(company_Profiles);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Registration_Date,Company_Website,Contact_Phone,Contact_Name,Company_Logo,Time_Stamp")] Company_Profiles company_Profiles)
 {
     if (ModelState.IsValid)
     {
         db.Entry(company_Profiles).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(company_Profiles));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Registration_Date,Company_Website,Contact_Phone,Contact_Name,Company_Logo,Time_Stamp")] Company_Profiles company_Profiles)
        {
            if (ModelState.IsValid)
            {
                company_Profiles.Id = Guid.NewGuid();
                db.Company_Profiles.Add(company_Profiles);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(company_Profiles));
        }
Esempio n. 4
0
        // GET: Company_Profiles/Delete/5
        public ActionResult Delete(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Company_Profiles company_Profiles = db.Company_Profiles.Find(id);

            if (company_Profiles == null)
            {
                return(HttpNotFound());
            }
            return(View(company_Profiles));
        }