//檢查時段 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")); }
public ActionResult Service_period(int[] wish_1st) { Service_period_VM service = new Service_period_VM(); service.wish1 = wish_1st; Session["Service_period"] = service; return(Content("新增/修改成功", "text/plain")); }
public ActionResult Service_period(int[] wish_1st, int[] wish_2nd, int[] wish_3rd) { Service_period_VM service = new Service_period_VM(); service.wish1 = null; service.wish1 = wish_1st; service.wish2 = wish_2nd; service.wish3 = wish_3rd; Session["Service_period"] = service; return(Content("新增服務時段成功", "text/plain")); }
public ActionResult Service_period() { Service_period_VM temp; if (Session["Service_period"] == null) { temp = new Service_period_VM(); } else { temp = Session["Service_period"] as Service_period_VM; } TempData["data"] = temp; return(PartialView()); }
//檢查時段 public ActionResult Check_period(int[] wish) { string re = ""; var service = new Service_period_VM(); if (Session["Service_period"] != null) { service = Session["Service_period"] as Service_period_VM; } if (service.wish1.Length == 0) { re += "服務時間"; } return(Content(re, "/UTF-8")); }
//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")); }