Example #1
0
        //檢查時段
        public ActionResult Check_period(string a)
        {
            string re      = "";
            var    service = new Service_period_VM();

            if (Session["Service_period"] != null)
            {
                service = Session["Service_period"] as Service_period_VM;
            }

            var interview = new Interview_period_VM();

            if (Session["Interview_period"] != null)
            {
                interview = Session["Interview_period"] as Interview_period_VM;
            }

            if (service.wish1.Length == 0)
            {
                re += "服務時間";
            }
            if (interview.wish1.Length == 0)
            {
                re += "," + "可面試時間";
            }
            return(Content(re, "/UTF-8"));
        }
Example #2
0
        public ActionResult Interview_period(int[] wish_1st)
        {
            Interview_period_VM service = new Interview_period_VM();

            service.wish1 = wish_1st;
            Session["Interview_period"] = service;
            return(Content("新增/修改成功", "text/plain"));
        }
Example #3
0
        public ActionResult Interview_period()
        {
            Interview_period_VM temp;

            if (Session["Interview_period"] == null)
            {
                temp = new Interview_period_VM();
            }
            else
            {
                temp = Session["Interview_period"] as Interview_period_VM;
            }
            TempData["data"] = temp;
            return(PartialView());
        }
Example #4
0
        //Demo
        public ActionResult Demo()
        {
            Session["Sign_up_session"] = new Sign_up_session
            {
                Chinese_name  = "李小明",
                Sex           = "Male",
                Birthday      = DateTime.Now.AddYears(-25),
                Sign_up_type  = "社會志工",
                Identity_card = "A123456789",
                Phone         = "02-12345678",
                Mobile        = "0912345678",
                Email         = "*****@*****.**",
                Address       = "台北市大安區復興南路一段390號",
                Education     = "大學",
                Job           = "服務業",
                Expertises    = new string[] { "1英文", "2日文" }
            };
            Session["Question"] = new Sign_up_questionnaireVM
            {
                Q1        = new string[] { "02打發時間", "03體驗志願服務工作" },
                Q2        = new string[] { "05有認識的人在醫院", "01離家近" },
                Q3        = new string[] { "05親友介紹", "09醫生介紹" },
                Q3doc     = "李大明醫師",
                Q4        = new string[] { "03員工眷屬", "06曾參與過本院相關活動" },
                Q5unit    = "春暉工作社",
                Q5years   = "2",
                Q5content = "陪伴唐氏症兒童",
                Q6jobs    = "超商店員",
                Q7        = "01是",
                Q8        = new string[] { "03捷運", "02機車" }
            };
            Session["Service_period"] = new Service_period_VM
            {
                wish1 = new int[] { 1, 5, 8, 9 },
                wish2 = new int[] { 2 },
                wish3 = new int[] { 7 }
            };
            Session["Interview_period"] = new Interview_period_VM
            {
                wish1 = new int[] { 1, 5, 8, 9 }
            };

            return(Redirect("/Home/NewVolunteer/2"));
        }