Ejemplo n.º 1
0
        List <FbSchool> parseEducation(JArray schools, string userId)
        {
            List <FbSchool> result = new List <FbSchool>();

            foreach (JObject school in schools)
            {
                if (null != school["school"])
                {
                    FbSchool s = new FbSchool();
                    s.UserID   = userId;
                    s.Name     = (string)school["school"]["name"];
                    s.SchoolID = (string)school["school"]["id"];
                    s.Type     = school["type"] != null ? (string)school["type"] : "";
                    s.Year     = school["year"] != null ? (string)school["year"]["name"] : "";
                    result.Add(s);
                }
            }
            return(result);
        }
 List<FbSchool> parseEducation(JArray schools, string userId)
 {
     List<FbSchool> result = new List<FbSchool>();
     foreach (JObject school in schools)
     {
         if (null != school["school"])
         {
             FbSchool s = new FbSchool();
             s.UserID = userId;
             s.Name = (string)school["school"]["name"];
             s.SchoolID = (string)school["school"]["id"];
             s.Type = school["type"] !=null ? (string)school["type"] : "";
             s.Year = school["year"] != null ? (string)school["year"]["name"] : "";
             result.Add(s);
         }
     }
     return result;
 }
Ejemplo n.º 3
0
 private static string buildSchoolRecord(FbSchool s)
 {
     string schoolLine = string.Format("\"{0}\",\"{1}\",\"{2}\",\"{3}\",{4}", s.UserID, s.SchoolID, s.Name, s.Type, s.Year);
     return schoolLine;
 }
Ejemplo n.º 4
0
        private static string buildSchoolRecord(FbSchool s)
        {
            string schoolLine = string.Format("\"{0}\",\"{1}\",\"{2}\",\"{3}\",{4}", s.UserID, s.SchoolID, s.Name, s.Type, s.Year);

            return(schoolLine);
        }