/// <summary>
/// 拖曳节点并保存结果
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void treelArea_DragDrop(object sender, DragEventArgs e)
{
TreeListNode fNode;
TreeListNode tNode;
string parentId;
string regId;
try
{
fNode = (e.Data.GetData(typeof(TreeListNode))) as TreeListNode; //数据来源节点
tNode = this.treelArea.CalcHitInfo(this.treelArea.PointToClient(new Point(e.X, e.Y))).Node;//目标节点
if (fNode != null && tNode != null)
{
parentId = tNode.GetValue("RegID").ToString().Trim();
regId = fNode.GetValue("RegID").ToString().Trim();
if (parentId.Length > 0 && regId.Length > 0)
{
areaSetupActionHelper.updateParentId(regId, parentId); //修改parentId;
GridViewBindData(regId); //刷新GrieView中的数据;
}
}
}
catch (Exception ex)
{
MyDialog.Alert(ex.Message,"拖曳时发生异常");
}
}
/// 拖曳节点并保存结果
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void treelArea_DragDrop(object sender, DragEventArgs e)
{
TreeListNode fNode;
TreeListNode tNode;
string parentId;
string regId;
try
{
fNode = (e.Data.GetData(typeof(TreeListNode))) as TreeListNode; //数据来源节点
tNode = this.treelArea.CalcHitInfo(this.treelArea.PointToClient(new Point(e.X, e.Y))).Node;//目标节点
if (fNode != null && tNode != null)
{
parentId = tNode.GetValue("RegID").ToString().Trim();
regId = fNode.GetValue("RegID").ToString().Trim();
if (parentId.Length > 0 && regId.Length > 0)
{
areaSetupActionHelper.updateParentId(regId, parentId); //修改parentId;
GridViewBindData(regId); //刷新GrieView中的数据;
}
}
}
catch (Exception ex)
{
MyDialog.Alert(ex.Message,"拖曳时发生异常");
}
}