82 lines
2.1 KiB
C#
82 lines
2.1 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Runtime.Serialization;
|
||
using System.ServiceModel;
|
||
using System.Text;
|
||
using System.Data;
|
||
using DeiNiu.wms.Logical;
|
||
using DeiNiu.wms.Data.Model;
|
||
|
||
namespace DeiNiu.Wcf
|
||
{
|
||
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名“Viechle”。
|
||
public class Viechle :basicService, IViechle
|
||
{
|
||
private static lTmsViechle _lViechle;
|
||
|
||
lTmsViechle lViechle
|
||
{
|
||
get
|
||
{
|
||
if (_lViechle == null || _lViechle.operId != getOperId())
|
||
{
|
||
_lViechle = new lTmsViechle(getOperId());
|
||
}
|
||
return _lViechle;
|
||
}
|
||
}
|
||
|
||
public DataSet Query(string querystr, int rownumStart, int rownumEnd)
|
||
{
|
||
return lViechle.Query(querystr, rownumStart, rownumEnd);
|
||
}
|
||
public DataTable queryActived()
|
||
{
|
||
return lViechle.getTmsViechle.queryByStatus(Utils.enumViechleStatus.可用);
|
||
}
|
||
public bool update(List<wcfViechle> wcfViechles)
|
||
{
|
||
foreach (wcfViechle wv in wcfViechles)
|
||
{
|
||
getTmsVc(wv).Update();
|
||
}
|
||
|
||
return true;
|
||
}
|
||
|
||
|
||
public bool add(wcfViechle wcfViechle)
|
||
{
|
||
return getTmsVc(wcfViechle).Add() > 0;
|
||
}
|
||
|
||
|
||
public bool delete(wcfViechle wcfViechle)
|
||
{
|
||
return getTmsVc(wcfViechle).Delete() > 0;
|
||
}
|
||
|
||
TmsViechle getTmsVc(wcfViechle wv)
|
||
{
|
||
TmsViechle tv = new TmsViechle();
|
||
|
||
tv.airCondition = wv.airCondition;
|
||
tv.driver = wv.driver;
|
||
tv.height = wv.height;
|
||
tv.width = wv.width;
|
||
tv.viechleId = wv.viechleId;
|
||
tv.volume = wv.volume;
|
||
tv.load = wv.load;
|
||
tv.length = wv.length;
|
||
tv.weight = wv.weight;
|
||
tv.driver = wv.driver;
|
||
tv.ID = wv.id;
|
||
tv.state = wv.state;
|
||
return tv;
|
||
|
||
}
|
||
|
||
}
|
||
}
|