本文整理汇总了C#中TreeListNode.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# TreeListNode.GetValue方法的具体用法?C# TreeListNode.GetValue怎么用?C# TreeListNode.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TreeListNode
的用法示例。
在下文中一共展示了TreeListNode.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyChangeForApiExtensions
private static void ApplyChangeForApiExtensions(TreeListNode node)
{
var tagName = (string)node.GetValue(0);
object theirValue = node.GetValue(1);
switch (tagName)
{
case "Category":
((UserOption)node.ParentNode.Tag).Category = (string)theirValue;
break;
case "DefaultValue":
((UserOption)node.ParentNode.Tag).DefaultValueFunctionBody = (string)theirValue;
break;
case "Description":
((UserOption)node.ParentNode.Tag).Description = (string)theirValue;
break;
case "IteratorType":
((UserOption)node.ParentNode.Tag).IteratorType = (Type)theirValue;
break;
case "ResetPerSession":
((UserOption)node.ParentNode.Tag).ResetPerSession = (bool)theirValue;
break;
case "Text":
((UserOption)node.ParentNode.Tag).Text = (string)theirValue;
break;
case "VariableName":
((UserOption)node.ParentNode.Tag).VariableName = (string)theirValue;
break;
case "VarType":
((UserOption)node.ParentNode.Tag).VarType = (Type)theirValue;
break;
default:
throw new NotImplementedException("Node not hendled yet: " + tagName);
}
}
示例2: CreateMessagesForNode
void CreateMessagesForNode(TreeListNode node)
{
List<Message> messages = new List<Message>();
MailType mailType = (MailType)node.GetValue(colType);
MailFolder mailFolder = (MailFolder)node.GetValue(colFolder);
foreach(Message message in DataHelper.Messages) {
if(message.MailType == mailType &&
(message.MailFolder == mailFolder || mailFolder == MailFolder.All) &&
!message.Deleted)
messages.Add(message);
}
node.SetValue(colData, messages);
}
示例3: CreateMessagesForNode
void CreateMessagesForNode(TreeListNode node)
{
List<User> users = new List<User>();
MailType mailType = (MailType)node.GetValue(colType);
MailFolder mailFolder = (MailFolder)node.GetValue(colFolder);
foreach (User user in DataHelper.User)
{
//if (user.MailType == mailType &&
// (user.MailFolder == mailFolder || mailFolder == MailFolder.All) &&
// !user.Deleted)
users.Add(user);
}
node.SetValue(colData, users);
}
示例4: SetCheckedChildNodes
private void SetCheckedChildNodes(TreeListNode node, CheckState check)
{
if (node.GetValue(0) != null)
if (Equals(node.GetValue(0).GetType(), typeof(OrderHeaderObj)))
{
((OrderHeaderObj)node.GetValue(0)).Checked = check == CheckState.Checked;
}
for (int i = 0; i < node.Nodes.Count; i++)
{
node.Nodes[i].CheckState = check;
SetCheckedChildNodes(node.Nodes[i], check);
}
}
示例5: Calculate
public ElectricityOriginalData Calculate(TreeListNode node, bool increase_or_not)
{
if (!node.HasChildren)
{
var result = data.Where(d => d.MID.ToString() == node.GetValue("MID").ToString()).ToList();
ElectricityOriginalData childData = result[0] as ElectricityOriginalData;
if (increase_or_not)
{
childData.WPP += childData.WPPIncre;
childData.WPN += childData.WPNIncre;
childData.WQP += childData.WQPIncre;
childData.WQN += childData.WQNIncre;
}
return childData;
}
else
{
var result = data.Where(d => d.MID.ToString() == node.GetValue("MID").ToString()).ToList();
ElectricityOriginalData childData = result[0] as ElectricityOriginalData;
childData.ClearData();
foreach (TreeListNode treeListNode in node.Nodes)
{
ElectricityOriginalData temp = Calculate(treeListNode, increase_or_not);
childData.WPP += temp.WPP;
childData.WPN += temp.WPN;
childData.WQP += temp.WQP;
childData.WQN += temp.WQN;
childData.IA += temp.IA;
childData.IB += temp.IB;
childData.IC += temp.IC;
childData.PA += temp.PA;
childData.PB += temp.PB;
childData.PC += temp.PC;
childData.PS += temp.PS;
childData.QA += temp.QA;
childData.QB += temp.QB;
childData.QC += temp.QC;
childData.QS += temp.QS;
childData.SA += temp.SA;
childData.SB += temp.SB;
childData.SC += temp.SC;
childData.SS += temp.SS;
}
return childData;
}
}
示例6: ParentsNodesGetIds
/// <summary>
/// Получить Id всех предков для данной ветки
/// </summary>
/// <param name="node">Текущая ветка</param>
/// <param name="idFieldName">Имя столбца с id</param>
/// <returns>Cписок всех Id</returns>
public static IEnumerable<int> ParentsNodesGetIds(TreeListNode node, string idFieldName)
{
var result = new List<int>();
while (node != null)
{
result.Add(Convert.ToInt32(node.GetValue(idFieldName)));
node = node.ParentNode;
}
return result;
}
示例7: Execute
public override void Execute(TreeListNode node)
{
var fn = node.GetValue(0);
if( fn is ReturnObj)
{
var ret = (ReturnObj) fn;
if (ret.Id == _returnObj.Id)
nodeCore = node;
}
}
示例8: GetCheckNode
void GetCheckNode(TreeListNode node, List<CoSite> lstSelectedItem)
{
if (node.CheckState == CheckState.Checked)
{
string code = node.GetValue("Code").ToString();
CoSite site = DataSource.Find(obj => obj.Code == code);
lstSelectedItem.Add(site);
}
foreach (TreeListNode childrenNode in node.Nodes)
GetCheckNode(childrenNode, lstSelectedItem);
}
示例9: SetCheckedChildNodes
private static void SetCheckedChildNodes(TreeListNode node, CheckState check)
{
if (node.GetValue(0) != null)
{
if (Equals(node.GetValue(0).GetType(), typeof (GoodsNodeCategoryObj)))
{
var oh = (GoodsNodeCategoryObj) node.GetValue(0);
oh.Check = check == CheckState.Checked;
}
if (Equals(node.GetValue(0).GetType(), typeof (GoodsNodeGroupObj)))
{
var oh = (GoodsNodeGroupObj) node.GetValue(0);
oh.Check = check == CheckState.Checked;
}
}
for (int i = 0; i < node.Nodes.Count; i++)
{
node.Nodes[i].CheckState = check;
SetCheckedChildNodes(node.Nodes[i], check);
}
}
示例10: GetNodeCaption
string GetNodeCaption(TreeListNode node)
{
string ret = string.Format("{0}", node.GetValue(colName));
while (node.ParentNode != null)
{
node = node.ParentNode;
ret = string.Format("{0} - {1}", node.GetValue(colName), ret);
}
return ret;
}
示例11: GetParentNodeKey
private void GetParentNodeKey(TreeListNode node,DevExpress.Web.ASPxTreeList.ASPxTreeList treeList)
{
if (node != treeList.RootNode && node.HasChildren)
{
sectionKeys.Add(Convert.ToInt32(node.Key));
sectionNames.Add(node.GetValue("Name") + " : " + node.GetValue("SiteSectionParentId"));
}
}
示例12: SetCheckedChildNodes
private void SetCheckedChildNodes(TreeListNode node, CheckState check)
{
if (node.GetValue(0) != null)
{
if (Equals(node.GetValue(0).GetType(), typeof(OrderHeaderData)))
{
var oh = (OrderHeaderData)node.GetValue(0);
if (oh.IdOrderState == 2)
{
oh.Check = check == CheckState.Checked;
}
else
{
oh.Check = false;
node.CheckState = CheckState.Unchecked;
}
}
if (Equals(node.GetValue(0).GetType(), typeof(PreOrderHeaderData)))
{
var oh = (PreOrderHeaderData)node.GetValue(0);
if (oh.IdOrderState == 2)
{
oh.Check = check == CheckState.Checked;
}
else
{
oh.Check = false;
node.CheckState = CheckState.Unchecked;
}
}
}
for (int i = 0; i < node.Nodes.Count; i++)
{
node.Nodes[i].CheckState = check;
SetCheckedChildNodes(node.Nodes[i], check);
}
}
示例13: Execute
public override void Execute(TreeListNode node)
{
if (node.HasChildren && node.Expanded)
Nodes.Add(node.GetValue(node.TreeList.KeyFieldName));
}
示例14: CheckNode
private void CheckNode(TreeListNode node)
{
string s_text = txtSearch.Text.ToLower();
object node_value = node.GetValue("FirstName");
if (node_value == null)
return;
if (node_value.ToString().ToLower().IndexOf(s_text) >= 0)
{
node.MakeVisible();
node.Focus();
}
//DataRowView drChild = node.DataItem as DataRowView;
//if (drChild == null)
// return;
//if (drChild["PER_FULLNAME"].ToString().ToLower().IndexOf(s_text) >= 0)
//{
// node.MakeVisible();
// node.Focus();
//}
}
示例15: AddNodeDataToList
//�ѽڵ����ݴ�ŵ������У������List
private void AddNodeDataToList(TreeListNode node, IList<PSP_P_Values> list)
{
foreach (TreeListColumn col in treeList1.Columns)
{
if (col.FieldName.IndexOf("��") > 0)
{
object obj = node.GetValue(col.FieldName);
if (obj != DBNull.Value)
{
PSP_P_Values v = new PSP_P_Values();
v.Flag2 = forecastReport.ID;
v.TypeID = (int)node.GetValue("ID");
v.Caption = node.GetValue("Title").ToString() + "," + v.TypeID;
v.Year = Convert.ToInt32(col.FieldName.Replace("��", ""));
v.Value = (double)node.GetValue(col.FieldName);
list.Add(v);
}
}
}
}