152 lines
3.3 KiB
C#
152 lines
3.3 KiB
C#
|
|
/// <summary>
|
|
///LOGIC CLASS FOR TABLE t_wmsOutDesk
|
|
///By wm with codesmith.
|
|
///on 07-21-2021
|
|
/// </summary>
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using DeiNiu.wms.Data.Model;
|
|
using System.Data;
|
|
using System.Transactions;
|
|
using DeiNiu.Utils;
|
|
|
|
namespace DeiNiu.wms.Logical
|
|
{
|
|
[Serializable]
|
|
public class lWmsOutDesk :lbase
|
|
{
|
|
WmsOutDesk _obj;
|
|
public lWmsOutDesk()
|
|
{
|
|
initialize();
|
|
}
|
|
|
|
public WmsOutDesk getWmsOutDesk
|
|
{
|
|
get
|
|
{
|
|
if (_obj == null)
|
|
{
|
|
_obj = new WmsOutDesk();
|
|
|
|
}
|
|
_obj.operater = operId;
|
|
return _obj;
|
|
}
|
|
}
|
|
|
|
public lWmsOutDesk(int operId)
|
|
: base(operId)
|
|
{
|
|
initialize();
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// get all data
|
|
/// </summary>
|
|
public DataSet getAllData()
|
|
{
|
|
return _obj.Query();
|
|
}
|
|
|
|
/// <summary>
|
|
/// get all data
|
|
/// </summary>
|
|
public DataSet getAllActiveData()
|
|
{
|
|
return _obj.QueryActived();
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// get a record by id
|
|
/// </summary>
|
|
public void initialize(int id)
|
|
{
|
|
_obj = id != 0 ? new WmsOutDesk(id) : new WmsOutDesk();
|
|
}
|
|
|
|
/// <summary>
|
|
/// get a record by id 0
|
|
/// </summary>
|
|
public void initialize()
|
|
{
|
|
initialize(0);
|
|
}
|
|
|
|
/// <summary>
|
|
/// get a record by id
|
|
/// </summary>
|
|
public void initialize(DataRow dr)
|
|
{
|
|
_obj = new WmsOutDesk(dr);
|
|
}
|
|
|
|
protected override DeiNiu.Data.BaseObject.BaseModel getModel()
|
|
{
|
|
return _obj;
|
|
}
|
|
|
|
//begin cust db operation, query, excute sql etc.
|
|
|
|
internal int add(WmsOutDesk obj)
|
|
{
|
|
return obj.Add();
|
|
}
|
|
|
|
|
|
private bool valid()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
internal int setAvailable(int color,bool isAvailable)
|
|
{
|
|
_obj = _obj.getDeskObjByColor(color);
|
|
_obj.available = isAvailable;
|
|
return _obj.Update();
|
|
}
|
|
|
|
|
|
|
|
internal int updateDeskType(int id, enumDeskType type)
|
|
{
|
|
_obj = new WmsOutDesk(id);
|
|
_obj.deskType = (int)type;
|
|
return _obj.Update();
|
|
}
|
|
|
|
internal int updateDeskStatus(int id, enumDeskState status)
|
|
{
|
|
_obj = new WmsOutDesk(id);
|
|
_obj.state = (int)status;
|
|
return _obj.Update();
|
|
}
|
|
|
|
internal int updateDeskSeedsCnt(int id, int seedsCnt)
|
|
{
|
|
_obj = new WmsOutDesk(id);
|
|
_obj.seedsCount = seedsCnt;
|
|
return _obj.Update();
|
|
}
|
|
|
|
internal int updateDesk(int id, enumDeskType type, enumDeskState status, int seedsCnt, int minSeedsCnt)
|
|
{
|
|
_obj = new WmsOutDesk(id);
|
|
_obj.seedsCount = seedsCnt;
|
|
_obj.state = (int)status;
|
|
_obj.deskType = (int)type;
|
|
_obj.seedsMinCount = minSeedsCnt;
|
|
return _obj.Update();
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|