PWA 2010 RemoveResourceCustomFieldsRow [英] PWA 2010 RemoveResourceCustomFieldsRow
本文介绍了PWA 2010 RemoveResourceCustomFieldsRow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
请找到以下代码
please find the below code
SvcResource.ResourceDataSet resourceDs = resourceClient.ReadResources(string.Empty, false);
Guid resVimal = new Guid("eb536541-e934-45fa-a9c6-8189fb4aa3d9");
resourceClient.CheckOutResources(new Guid[] { resVimal });
foreach (SvcResource.ResourceDataSet.ResourceCustomFieldsRow row in resourceDs.ResourceCustomFields.Rows)
{
if (row.MD_PROP_UID == ResourceDepartmentUID && row.RES_UID == resVimal && row.CODE_VALUE == ResourceDepartmentValue)
{
resourceDs.ResourceCustomFields.RemoveResourceCustomFieldsRow(row);
// resourceDs.ResourceCustomFields.del
//resourceDs.ResourceCustomFields.rem
break;
// row.CODE_VALUE = ResourceDepartmentValue;
}
}
resourceClient.UpdateResources(resourceDs, false, false);
resourceClient.CheckInResources(new Guid[] { resVimal }, true);
上面的代码没有删除部门值,可以任何一个请指导我同样的
the above code is not removing the department value, can any one please guide me for the same
谢谢
vimal
关注Vimal
推荐答案
你好,
我让它运转了,使用RemoveResourceCustomFields,我必须使用row.Delete(),因此它在DataTable中将该行标记为已删除。
I got it working , instead of using the RemoveResourceCustomFields , i have to use row.Delete(), so it mark the row as deleted in the DataTable.
并且它有效。
谢谢
这篇关于PWA 2010 RemoveResourceCustomFieldsRow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文