/// <summary> /// 新ID转换成老HISID /// </summary> /// <param name="type"></param> /// <param name="id">新的HIS编码</param> /// <param name="db"></param> /// <returns></returns> public static string ConvertNewhisidToOldHisid(DataMapType type, string id, RelationalDatabase db) { string ssql = "select oldid from datamap where NEWTABLE='" + type.ToString() + "' and newid='" + id + "'"; DataTable tb = db.GetDataTable(ssql); if (tb.Rows.Count > 0) { return(Convertor.IsNull(tb.Rows[0]["oldid"], "")); } else { return(""); } }
private void ApplyField(UIMapper aMapper) { if (aMapper != null && aMapper.ShowDialog() == DialogResult.OK) { MapReferences mapRef = Mapped.LoadMapToTree(projectView, UIMapper.Result, ctxTreeMenu); mapRef.LastMap = currentMode; mapRef.LastMethodMap = aMapper.MethodMap; if (UIMapper.RuleSets.Count > 0) { string storeName = currentMode.ToString(); Guid anId = Guid.Empty; if (currentMode == DataMapType.MethodParameterMap) { anId = aMapper.MethodMap.ID; storeName = mapRef.LastMethodMap.MethodName; } MapManager.FindRuleAndUpdate(storeName, mapRef.ReferenceInfo, UIMapper.RuleSets, currentMode, anId); } } }
public static bool LoadDataTableToMapNode(TreeView projectView, String className, ReturnData data, DataMapType mode) { MapReferences newRef = null; if (!FindMap(projectView, className, out newRef)) { return(false); } Guid anId = Guid.Empty; string methodName = mode.ToString(); if (mode == DataMapType.MethodParameterMap) { methodName = newRef.LastMethodMap.MethodName; anId = newRef.LastMethodMap.ID; } if (MapManager.FindStoreAndUpdate(newRef.ViableInfo.StoredData, mode, methodName, data.QueryResult, anId)) { MapManager.FindSQLAndUpdate(methodName, anId, data.QueryResult.Columns.Count, newRef.ReferenceInfo, data.SQLText); } return(true); }