/// <summary> /// 初始化字典列表 /// </summary> /// <param name="System_Station_ID">机构ID</param> /// <returns>List<H_Dictionary></returns> public void GetInitializationAllHDictionaryList(int System_Station_ID, string ColumnName) { List <H_Dictionary> list = GetAllHDictionaryList(System_Station_ID, ColumnName); List <H_Dictionary> listDetail = GetHictionartyDetailByColumnName(System_Station_ID, ColumnName); if (list.Count > 0) { foreach (var model in list) { var data = listDetail.Where(x => x.ID == model.ID).FirstOrDefault(); if (data != null) { continue; } H_Dictionary_Detail HDmodel = new H_Dictionary_Detail(); HDmodel.Description = model.Description; HDmodel.Dictionary_ID = model.ID; HDmodel.SortID = model.SortID; HDmodel.Valid = model.Valid; HDmodel.IsDelete = model.IsDelete; HDmodel.System_Station_ID = System_Station_ID; InsertHDictionary(HDmodel); } } }
/// <summary> /// 增加字典详细表 by ljg 20171027 /// </summary> /// <param name="Model"></param> /// <returns></returns> public bool InsertHDictionary(H_Dictionary_Detail Model) { if (Orm.Insert(Model) <= 0) { throw new ApiException("添加失败"); } return(true); }