示例#1
0
        public ActionResult Index(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = id;


            int ClientRefid = caseModel.GetClientRefIdssId(id);
            //Get Module Reference number ....................
            string ClientRef = caseModel.GetClientRef(ClientRefid);

            Session["ClientRef"]   = ClientRef;
            Session["IntakeassId"] = id;
            ViewBag.ModuleRef      = ClientRef;


            return(PartialView(personVM));
        }
示例#2
0
        // GET: PCMPresentence_Sentence
        #region Child Details
        public ActionResult IndexPresentence(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            //instanciate model repositry
            PCMPresentenceModel caseModel = new PCMPresentenceModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM   = new PCMPersonViewModel();
            PCMCaseModel       caseModelC = new PCMCaseModel();
            //get person id by assessment id
            int personId = caseModel.GetPCMPersonIdByintAssId(id);

            //get person record
            personVM = caseModel.GetPCMPerson(personId);

            int ClientRefid = caseModelC.GetClientRefIdssId(id);
            //Get Module Reference number ....................
            string ClientRef = caseModelC.GetClientRef(ClientRefid);

            Session["ClientRef"] = ClientRef;
            ViewBag.ModuleRef    = ClientRef;
            return(PartialView(personVM));
        }
示例#3
0
        // GET: HBS
        public ActionResult Home(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            //instanciate model repositry
            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = id;

            bool IntakeAssessmentIdExisit = db.PCM_HB_Supervision.Any(x => x.Intake_Assessment_Id == id);


            int ClientRefid = caseModel.GetClientRefIdssId(id);
            //Get Module Reference number ....................
            string ClientRef = caseModel.GetClientRef(ClientRefid);

            Session["ClientRef"]   = ClientRef;
            Session["IntakeassId"] = id;
            ViewBag.ModuleRef      = ClientRef;

            int?Placementid = preModel.GetPlacementId(id);

            ViewBag.MessagePlacement = Placementid;
            Session["Placement"]     = Placementid;

            if (IntakeAssessmentIdExisit)
            {
                Session["Idc1"]        = id;
                Session["IntakeassId"] = id;


                return(View(personVM));
            }
            else
            {
                Session["Idc1"]        = id;
                Session["IntakeassId"] = id;


                //Response.Write("does not Exist");
                return(View(personVM));
            }
        }
示例#4
0
        public ActionResult IndexVO()
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            var currentUser  = (User)Session["CurrentUser"];
            var userProvince = -1;
            var userId       = 0;

            if (currentUser != null)
            {
                userId = currentUser.User_Id;
                if (currentUser.Employees.Any())
                {
                    userProvince = currentUser.Employees.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id;
                }
                if (currentUser.apl_Social_Worker.Any())
                {
                    userProvince = currentUser.apl_Social_Worker.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id;
                }
            }


            int assID = Convert.ToInt32(Session["IntakeassId"]);
            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = assID;


            int ClientRefid = caseModel.GetClientRefIdssId(assID);
            //Get Module Reference number ....................
            string ClientRef = caseModel.GetClientRef(ClientRefid);

            Session["ClientRef"]   = ClientRef;
            Session["IntakeassId"] = assID;
            ViewBag.ModuleRef      = ClientRef;
            var Compliance_Type = m.GetComplianceType();

            vm.Compliance_Type      = m.GetComplianceType();
            ViewBag.Compliance_List = new SelectList(db.apl_PCM_Compliance.ToList(), "Compliance_Id", "Description");

            return(PartialView(vm));
        }
示例#5
0
        public PCMPersonViewModel GetPCMPerson(int personId)
        {
            PCMPersonViewModel     pcvm = new PCMPersonViewModel();
            SDIIS_DatabaseEntities db   = new SDIIS_DatabaseEntities();

            var act = db.Persons.Find(personId);

            pcvm.Person_Id             = personId;
            pcvm.First_Name            = act.First_Name;
            pcvm.Last_Name             = act.Last_Name;
            pcvm.Identification_Number = act.Identification_Number;
            pcvm.Date_Of_Birth         = act.Date_Of_Birth;
            return(pcvm);
        }
示例#6
0
        public ActionResult IndexPre(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = id;
            return(View(personVM));
        }
示例#7
0
        public ActionResult Home(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            var currentUser  = (User)Session["CurrentUser"];
            var userProvince = -1;
            var userId       = 0;

            if (currentUser != null)
            {
                userId = currentUser.User_Id;
                if (currentUser.Employees.Any())
                {
                    userProvince = currentUser.Employees.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id;
                }
                if (currentUser.apl_Social_Worker.Any())
                {
                    userProvince = currentUser.apl_Social_Worker.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id;
                }
            }

            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = id;


            int ClientRefid = caseModel.GetClientRefIdssId(id);
            //Get Module Reference number ....................
            string ClientRef = caseModel.GetClientRef(ClientRefid);

            Session["ClientRef"]   = ClientRef;
            ViewBag.ModuleRef      = ClientRef;
            Session["IntakeassId"] = id;



            return(View(personVM));
        }
        public ActionResult Home(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = id;


            int ClientRefid = caseModel.GetClientRefIdssId(id);
            //Get Module Reference number ....................
            string ClientRef = caseModel.GetClientRef(ClientRefid);

            Session["ClientRef"]   = ClientRef;
            Session["IntakeassId"] = id;
            ViewBag.ModuleRef      = ClientRef;



            //int assID = Convert.ToInt32(Session["IntakeassId"]);


            int?Placementid = preModel.GetPlacementId(id);

            ViewBag.MessagePlacement = Placementid;
            Session["Placement"]     = Placementid;


            return(View(personVM));
        }
示例#9
0
        public ActionResult Index(int id)
        {
            //get current username
            string loginName = User.Identity.Name;

            Session["LoginName"] = loginName;

            var currentUser  = (User)Session["CurrentUser"];
            var userProvince = -1;
            var userId       = 0;

            if (currentUser != null)
            {
                userId = currentUser.User_Id;
                if (currentUser.Employees.Any())
                {
                    userProvince = currentUser.Employees.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id;
                }
                if (currentUser.apl_Social_Worker.Any())
                {
                    userProvince = currentUser.apl_Social_Worker.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id;
                }
            }
            var HBSConditionType = m.GetCondition();

            vm.Condition_List = m.GetCondition();

            var HBSsupersorType = m.GetHBSsupervisorType();

            vm.HBSsupervisor_Type = m.GetHBSsupervisorType();

            bool IntakeAssessmentIdExisit = db.PCM_HB_Supervision.Any(x => x.Intake_Assessment_Id == id);



            int assID = Convert.ToInt32(Session["IntakeassId"]);
            //instanciate model repositry
            PCMCaseModel caseModel = new PCMCaseModel();

            //instanciate viewmodel
            PCMPersonViewModel personVM = new PCMPersonViewModel();

            //get person id by assessment id
            personVM.IntakeAssPar = assID;


            int ClientRefid = caseModel.GetClientRefIdssId(assID);
            //Get Module Reference number ....................
            string ClientRef = caseModel.GetClientRef(ClientRefid);

            Session["ClientRef"]   = ClientRef;
            Session["IntakeassId"] = assID;
            ViewBag.ModuleRef      = ClientRef;



            if (IntakeAssessmentIdExisit)
            {
                Session["Idc1"]        = id;
                Session["IntakeassId"] = id;


                return(PartialView(vm));
            }
            else
            {
                Session["Idc1"]        = id;
                Session["IntakeassId"] = id;


                //Response.Write("does not Exist");
                return(PartialView(vm));
            }
        }