125 lines
2.8 KiB
C#
125 lines
2.8 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Runtime.Serialization;
|
||
using System.ServiceModel;
|
||
using System.Text;
|
||
using System.Data;
|
||
|
||
namespace DeiNiu.Wcf
|
||
{
|
||
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“INode”。
|
||
[ServiceContract]
|
||
public interface INode
|
||
{
|
||
[OperationContract]
|
||
int newNode(string name,string description,int parentId,int flag);
|
||
[OperationContract]
|
||
DataSet Query(string querystr, int rownumStart, int rownumEnd);
|
||
[OperationContract]
|
||
wcfNode newWcfNode(wcfNode wnode);
|
||
[OperationContract]
|
||
wcfNode updateWcfNode(wcfNode wnode);
|
||
[OperationContract]
|
||
int deleteNode(int id);
|
||
|
||
[OperationContract]
|
||
DataTable getNodesByFlag(int flag);
|
||
[OperationContract]
|
||
void applyDicChanges();
|
||
|
||
[OperationContract]
|
||
DataTable getOwners();
|
||
|
||
|
||
}
|
||
|
||
[DataContract]
|
||
public class wcfNode
|
||
{
|
||
|
||
internal int _id = 0;
|
||
internal string _name = String.Empty;
|
||
internal string _description = String.Empty;
|
||
internal int _parentid;
|
||
internal int _flag;
|
||
internal string _value = String.Empty;
|
||
internal bool _isOn;
|
||
internal int _valueType = 0;
|
||
internal bool _isSystem ;
|
||
|
||
public wcfNode()
|
||
{
|
||
}
|
||
|
||
#region Public Properties
|
||
|
||
[DataMember]
|
||
public int id
|
||
{
|
||
get { return _id; }
|
||
set { _id = value; }
|
||
}
|
||
|
||
[DataMember]
|
||
public string name
|
||
{
|
||
get { return _name; }
|
||
set { _name = value; }
|
||
}
|
||
[DataMember]
|
||
public bool isOn
|
||
{
|
||
get { return _isOn; }
|
||
set { _isOn = value; }
|
||
}
|
||
[DataMember]
|
||
public bool isSystem
|
||
{
|
||
get { return _isSystem; }
|
||
set { _isSystem = value; }
|
||
}
|
||
[DataMember]
|
||
public string value
|
||
{
|
||
get { return _value; }
|
||
set { _value = value; }
|
||
}
|
||
[DataMember]
|
||
public int valueType
|
||
{
|
||
get { return _valueType; }
|
||
set { _valueType = value; }
|
||
}
|
||
|
||
[DataMember]
|
||
public string description
|
||
{
|
||
get { return _description; }
|
||
set { _description = value; }
|
||
}
|
||
[DataMember]
|
||
public int parentid
|
||
{
|
||
get { return _parentid; }
|
||
set { _parentid = value; }
|
||
}
|
||
[DataMember]
|
||
public int flag
|
||
{
|
||
get { return _flag; }
|
||
set { _flag = value; }
|
||
}
|
||
|
||
|
||
#endregion
|
||
|
||
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
}
|