예제 #1
0
파일: Zhishiku.cs 프로젝트: huaminglee/YCT
 internal static Daan ChuangjianDaan(DaanDataModel model)
 {
     List<FujianXinxi> fujianList = null;
     if (!string.IsNullOrEmpty(model.FujianJson))
     {
         fujianList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<FujianXinxi>>(model.FujianJson);
     }
     Daan daan = new Daan(model.Id, model.Neirong, fujianList);
     return daan;
 }
예제 #2
0
파일: Zhishiku.cs 프로젝트: huaminglee/YCT
        internal static Daan ChuangjianDaan(string neirong, List<FujianXinxi> fujianList)
        {
            DaanDataModel model = new DaanDataModel();
            model.Neirong = neirong;
            if (fujianList != null)
            {
                model.FujianJson = Newtonsoft.Json.JsonConvert.SerializeObject(fujianList);
            }
            model.Id = (int)NHibernateHelper.CurrentSession.Save(model);

            Daan daan = ChuangjianDaan(model);
            return daan;
        }