Ejemplo n.º 1
0
        public ActionResult DeletePermission(int id)
        {
            EHealthEntities ctx = new EHealthEntities();
            Permission      per = ctx.Permissions.Find(id);

            ctx.Permissions.Remove(per);

            ctx.SaveChanges();
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult AddPermission(int sid, int pid, bool ReadEHR, bool WriteEHR, bool DeleteEHR)
        {
            EHealthEntities ctx = new EHealthEntities();
            Permission      per = new Permission();

            per.SupervisorID = sid;
            per.PatientID    = pid;
            per.ReadEHR      = ReadEHR;
            per.WriteEHR     = WriteEHR;
            per.DeleteEHR    = DeleteEHR;

            ctx.Permissions.Add(per);
            ctx.SaveChanges();
            return(View());
        }
Ejemplo n.º 3
0
        public ActionResult UserProfileView(EHR ehr)
        {
            // string strmy=Request.QueryString["Body"];
            using (var ctx = new EHealthEntities())
            {
                EHR objehr = new EHR();
                objehr.UserID         = ehr.UserID;
                objehr.EHRID          = ehr.EHRID;
                objehr.EHRDescription = ehr.EHRDescription;
                objehr.UserName       = ehr.UserName;
                objehr.LastUpdated    = ehr.LastUpdated;

                ctx.Entry(ehr).State = EntityState.Modified;

                ctx.SaveChanges();
            }
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        public ActionResult SUPUserProfileView(int ehrid, int ehruserid, string ehrdesc)
        {
            int    ehridup     = Convert.ToInt32(ehrid);
            int    ehruseridup = Convert.ToInt32(ehruserid);
            string ehrdescup   = ehrdesc;

            using (var ctx = new EHealthEntities())
            {
                EHR ehr = new EHR();
                ehr.EHRID  = ehridup;
                ehr.UserID = ehruseridup;

                ehr.EHRDescription = ehrdescup;

                ctx.Entry(ehr).State = EntityState.Modified;
                ctx.SaveChanges();
            }
            return(RedirectToAction("Index"));
        }