Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            peoples peoples = db.peoples.Find(id);

            db.peoples.Remove(peoples);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public Pacient(peoples people, string hospitalName, string decease, string doctorFIO)
 {
     this.id = people.id;
         this.hospitalName = hospitalName;
         this.fullname = people.name + " " + people.sourname;
         this.decease = decease;
         this.doctorFIO = doctorFIO;
 }
Example #3
0
 public ActionResult Edit([Bind(Include = "ID,Title,Name,Surname,Department,Consultation,Tel")] peoples peoples)
 {
     if (ModelState.IsValid)
     {
         db.Entry(peoples).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(peoples));
 }
Example #4
0
        public ActionResult Create([Bind(Include = "ID,Title,Name,Surname,Department,Consultation,Tel")] peoples peoples)
        {
            if (ModelState.IsValid)
            {
                db.peoples.Add(peoples);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(peoples));
        }
Example #5
0
        // GET: People/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            peoples peoples = db.peoples.Find(id);

            if (peoples == null)
            {
                return(HttpNotFound());
            }
            return(View(peoples));
        }
Example #6
0
        public bool Login(string name, string pass)
        {
            if (MedClient.Login(name, pass) == "OK")
                Logged = true;
            else
                Logged = false;

            info = this.MedClient.GetPeopleInfo(name);

            return Logged;
        }