查找表值未获得更新 [英] Lookup Table Value is not Getting Updated

查看:65
本文介绍了查找表值未获得更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone,

Hello Everyone,

我在更新查找表值时遇到的问题是我用来更新查找表的代码我相信我在做是的,但不幸的是价值没有得到更新,但我没有得到错误,它只是执行
罚款,但当我在pwa检查它我没有任何更新,所以请告诉我,如果我是对以下代码块做错了。

I am having problem in updating a looking table value below is the code that i am using to update the lookup table i believe i am doing it right but unfortunately the value does not get updated however i am not getting error either it simply executes fine but when i check it in pwa i don't have anything updated so please do let me know if i am doing anything wrong with the following code block.

Guid [] ltGuids = new Guid [] {new Guid(CutoffDateUid)};

updatedltds = LT.ReadLookupTablesByUids (ltGuids,false,1033);
$


psiLookupTable.LookupTableDataSet.LookupTableTreesRow drLT_TREE = updatedltds.LookupTableTrees.NewLookupTableTreesRow();



drLT_TREE.LT_UID =新Guid(CutoffDateUid);

drLT_TREE.LT_STRUCT_UID = Guid.NewGuid();

drLT_TREE.SetLT_PARENT_STRUCT_UIDNull();

drLT_TREE.LT_VALUE_DATE = ParsedCutoffDate;

drLT_TREE.LT_VALUE_SORT_ INDEX =(byte)PSLibrary.LookupTables.SortOrder.Ascending;



updatedltds.LookupTableTrees.ImportRow(drLT_TREE);

updatedltds.LookupTableTrees。 AcceptChanges();
$
updatedltds.AcceptChanges();
$


LT.CheckOutLookupTables(ltGuids);

LT .UpdateLookupTables(updatedltds,false,false,1033);
$
LT.CheckInLookupTables(ltGuids,false);

Guid[] ltGuids = new Guid[] { new Guid(CutoffDateUid) };
updatedltds = LT.ReadLookupTablesByUids(ltGuids, false, 1033);

psiLookupTable.LookupTableDataSet.LookupTableTreesRow drLT_TREE = updatedltds.LookupTableTrees.NewLookupTableTreesRow();

drLT_TREE.LT_UID = new Guid(CutoffDateUid);
drLT_TREE.LT_STRUCT_UID = Guid.NewGuid();
drLT_TREE.SetLT_PARENT_STRUCT_UIDNull();
drLT_TREE.LT_VALUE_DATE = ParsedCutoffDate;
drLT_TREE.LT_VALUE_SORT_INDEX = (byte)PSLibrary.LookupTables.SortOrder.Ascending;

updatedltds.LookupTableTrees.ImportRow(drLT_TREE);
updatedltds.LookupTableTrees.AcceptChanges();
updatedltds.AcceptChanges();

LT.CheckOutLookupTables(ltGuids);
LT.UpdateLookupTables(updatedltds, false, false, 1033);
LT.CheckInLookupTables(ltGuids, false);

推荐答案

嗨abhinaxis,

Hi abhinaxis,

尝试改变:

updatedltds.LookupTableTrees.ImportRow(drLT_TREE);

updatedltds.LookupTableTrees.AcceptChanges();

updatedltds.AcceptChanges();

LT.CheckOutLookupTables(ltGuids);

LT.UpdateLookupTables(updatedltds,false,false,1033);
$
LT.CheckInLookupTables(ltGuids,false );

with:

updatedltds.LookupTableTrees.Rows.add(drLT_TREE);

WebSvcLookupTable.LookupTableDataSet newLTDs = updatedltds.GetChanges()as  WebSvcLookupTable.LookupTableDataSet;

LT.CheckOutLookupTables(ltGuids);

LT.UpdateLookupTables(newLTDs,false,false,1033);

LT.CheckInLookupTables(ltGuids,false );

 

我希望这可以帮到你,

最好的问候

Paolo O。


这篇关于查找表值未获得更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆