//確認註冊資料 public ActionResult CheckRegister(Memb p) { string s1 = (string)Session["s1"]; string verification = (string)Session["verification"]; p.UsEmail = (string)Session["email"]; p.UsPassword = (string)Session["pwd"]; p.UsJnD = DateTime.Now; if (s1 == AesDecryptBase64(verification)) { db.Memb.Add(p); db.SaveChanges(); } Session.Clear(); return(RedirectToAction("Login")); }
private void GetGroups() { if (this._Contents == null) { return; } String Name = ""; Member Memb = new Member(); bool Found = false; bool Found2 = false; bool Found3 = false; bool Found4 = false; foreach (String s in this._Contents) { if (s.StartsWith("$")) { Name = s.Split('$').Last(); Found = true; _Groups[Name] = new Group(Name); continue; } if (Found && s.Equals("{")) { Found2 = true; continue; } if (Found && Found2) // Within the members { if (s.Trim('\t').StartsWith("£")) { Memb = new Member(s.Split('£').Last()); Found3 = true; continue; } if (Found3 && s.Trim('\t').Equals("{")) { Found4 = true; continue; } if (Found3 && Found4 && !s.Trim('\t').Equals("}")) // Within the values { String Name2 = s.Split(new char[] { '=' }, 2)[0].Trim('\t', ' '); String Value2 = s.Split(new char[] { '=' }, 2)[1].Trim(' '); Memb.Add(new Value(Name2, Value2)); continue; } if (s.Trim('\t').Equals("}") && s.Contains('\t')) // End of a member { Found3 = false; Found4 = false; if (_Groups.ContainsKey(Name)) { _Groups[Name].Add(Memb); } continue; } } if (!s.StartsWith("\t") && s.Equals("}")) // End of a group { Found = false; Found2 = false; continue; } } }