Exemplo n.º 1
0
        public ActionResult AssignPerson(AssignedPerson model, string userName, string uid, string status, string designation)
        {
            ViewBag.UserName    = userName;
            ViewBag.UserID      = uid;
            ViewBag.Status      = status;
            ViewBag.Designation = designation;

            var content = from p in dbObj.ProjectInformations select new { p.iID, p.vName };
            var x       = content.ToList().Select(c => new SelectListItem
            {
                Text     = c.vName,
                Value    = c.vName,
                Selected = (c.iID == 1)
            }).ToList();

            ViewBag.ProjectList = x;

            var content2 = from p in dbObj.Users where p.vDesignation != "IT-Admin" select new { p.iID, p.vName };
            var x2       = content2.ToList().Select(c => new SelectListItem
            {
                Text     = c.vName,
                Value    = c.vName,
                Selected = (c.iID == 1)
            }).ToList();

            ViewBag.UserList = x2;

            objProject.SaveAssignedPersonInfo(model);

            var assignList = objProject.GetAssignList();

            ViewBag.AssignDetails = assignList;

            return(View());
        }
Exemplo n.º 2
0
        public ActionResult <AssignedPerson> AddPerson(AssignedPerson person)
        {
            if (ModelState.IsValid)
            {
                _dataContext.AssignedPerson.Add(person);
                _dataContext.SaveChanges();
                var people = _dataContext.AssignedPerson.ToList();

                return(RedirectToAction("AddPerson", people));
            }

            return(BadRequest());
        }
Exemplo n.º 3
0
        public void SaveAssignedPersonInfo(AssignedPerson model)
        {
            ProjectInformation projectInfo = dbObj.ProjectInformations.First(p => p.vName == model.vProjectName);
            var projectID = projectInfo.iID;

            User userInfo        = dbObj.Users.First(p => p.vName == model.vAssignedPersonName);
            var  userDesignation = userInfo.vDesignation;

            model.vAssignedPersonDesignation = userDesignation;
            model.iProjectID = projectID;

            AssignedPerson obj = new AssignedPerson();

            obj.iProjectID                 = model.iProjectID;
            obj.vProjectName               = model.vProjectName;
            obj.vAssignedPersonName        = model.vAssignedPersonName;
            obj.vAssignedPersonDesignation = model.vAssignedPersonDesignation;
            dbObj.AssignedPersons.Add(obj);
            dbObj.SaveChanges();
        }
Exemplo n.º 4
0
        private DocumentationOfCcd GetDocumentationOf(PrimaryCarePhysician pcp, Event theEventData)
        {
            if (pcp == null)
            {
                return(null);
            }
            AssignedPerson assingedPerson = null;

            if (pcp.Name != null)
            {
                assingedPerson = new AssignedPerson
                {
                    Name = GetName(pcp.Name)
                };
            }
            return(new DocumentationOfCcd
            {
                ServiceEvent = new ServiceEvent
                {
                    EffectiveTime = new EffectiveTime
                    {
                        Low = new DocumentGenerationDate(theEventData.EventDate),
                        High = new DocumentGenerationtime(DateTime.Now)
                    },
                    ClassCode = PerformerTypeCode.Perfromer,
                    Performer = new Performer
                    {
                        AssingnedEntity = new AssingnedEntity
                        {
                            Address = GetClinicalAddress(pcp.Address, AddressType.Workplace),

                            AssignedPerson = assingedPerson,
                            ClinicalTeleCom = (pcp.Fax != null && !pcp.Fax.IsEmpty()) ? new ClinicalTeleCom(TelecomType.Workplace, pcp.Fax.FaxNumberFormat) : null
                        },
                        TypeCode = PerformerTypeCode.Perfromer
                    }
                }
            });
        }