return nodes.ToJson();
}
///
/// 操作集合
///
///
///
protected void Menu_Click(object sender, DirectEventArgs e)
{
string item = e.ExtraParams.GetParameter("Item").Value;
string[] strValue = txtValue.Text.Split('|');
switch (item)
{
case "menuAddSubitem":
if (strValue.Length <= 1)
Notification.Show(new NotificationConfig
{
Title = "客户来源管理",
Icon = Icon.Information,
Html = "未选择记录"
});
else
{
txt_Menu_Name_varchar2.Text = "";
this.txt_Menu_ParentID_number.Text = strValue[0];
txtType.Text = "add";
this.winMenuAdd.Title = "新建子客户来源";
this.winMenuAdd.Show();
}
break;
case "menuAdd":
txt_Menu_Name_varchar2.Text = "";
this.txt_Menu_ParentID_number.Text = "-1";
this.winMenuAdd.Title = "新建客户来源";
txtType.Text = "add";
this.winMenuAdd.Show();
break;
case "menuEdit":
if (strValue.Length <= 1)
Notification.Show(new NotificationConfig
{
Title = "客户来源管理",
Icon = Icon.Information,
Html = "未选择记录"
});
else
{
txt_Menu_Name_varchar2.Text = strValue[1];
this.txt_Menu_ParentID_number.Text = strValue[2];
txtType.Text = "edit";
this.winMenuAdd.Title = "菜单修改";
this.winMenuAdd.Show();
}
break;
case "menuDelete":
if (strValue.Length <= 1)
{
Notification.Show(new NotificationConfig
{
Title = "客户来源管理",
Icon = Icon.Information,
Html = "未选择记录"
});
}
else
{
this.Delete();
}
break;
}
}
[DirectMethod]
public void ClickCurrentNode(string name)
{
txtValue.Text = name;
}
///
/// 保存
///
///
[DirectMethod]
public string Save()
{
string name = this.txt_Menu_Name_varchar2.Text;
string pid = this.txt_Menu_ParentID_number.Text;
MenuInfo menu = new MenuInfo();
menu.Name