68 lines
2.2 KiB
Plaintext
68 lines
2.2 KiB
Plaintext
|
<%@ CodeTemplate Language="C#" TargetLanguage="Text" Description="This template demonstrates using properties defined in external assemblies." %>
|
|||
|
<%@ Property Name="SourceDatabase" Type="SchemaExplorer.DatabaseSchema" Category="Context" Description="Database that the documentation should be based on." %>
|
|||
|
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context" Description="The table to use for this sample." %>
|
|||
|
<%@ Assembly Name="SchemaExplorer" %>
|
|||
|
<%@ Import Namespace="SchemaExplorer" %>
|
|||
|
|
|||
|
<script runat="template">
|
|||
|
|
|||
|
<!-- #include file="scripts.cs" -->
|
|||
|
|
|||
|
</script>
|
|||
|
/// <summary>
|
|||
|
///WCF service
|
|||
|
///FOR TABLE <%=this.SourceTable.Name%>
|
|||
|
///By wm
|
|||
|
///on <%= DateTime.Now.ToString("MM/dd/yyyy")%>
|
|||
|
/// </summary>
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Runtime.Serialization;
|
|||
|
using System.ServiceModel;
|
|||
|
using System.Text;
|
|||
|
using DeiNiu.wms.Logical;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace DeiNiu.Wcf
|
|||
|
{
|
|||
|
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名 。
|
|||
|
public class <%=getWcfSvcClassName() %>: basicService, <%=getWcfSvcInterfaceName() %>
|
|||
|
{
|
|||
|
private static <%=getLogicClassName()%> _l<%=getLogicClassName()%> ;
|
|||
|
<%=getLogicClassName()%> <%=getLogicClassName()%>Obj
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
if ( _<%=getLogicClassName()%> == null || _<%=getLogicClassName()%>.operId != getOperId())
|
|||
|
{
|
|||
|
_<%=getLogicClassName()%>= new <%=getLogicClassName()%>(getOperId());
|
|||
|
}
|
|||
|
return _<%=getLogicClassName()%>;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public DataSet query(string querystr, int rownumStart, int rownumEnd)
|
|||
|
{
|
|||
|
return <%=getLogicClassName()%>.Query(querystr, rownumStart, rownumEnd);
|
|||
|
}
|
|||
|
|
|||
|
public int add(<%=getWcfClassName() %> wcfData)
|
|||
|
{
|
|||
|
return <%=getLogicClassName()%>.add(wcfData.getDbObject());
|
|||
|
}
|
|||
|
|
|||
|
public int update(<%=getWcfClassName() %> wcfData)
|
|||
|
{
|
|||
|
return wcfData.getDbObject().Update();
|
|||
|
}
|
|||
|
|
|||
|
public int delete(<%=getWcfClassName() %> wcfData)
|
|||
|
{
|
|||
|
return wcfData.getDbObject().Delete();
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|