/// ///LOGIC CLASS FOR TABLE t_wmsOutPickLable ///By wm with codesmith. ///on 05/22/2017 /// 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.Data.BaseObject; namespace DeiNiu.wms.Logical { [Serializable] public class lWmsOutPickLable :lbase { WmsOutPickLable _obj; public lWmsOutPickLable() { initialize(); } public WmsOutPickLable getWmsOutPickLable { get { return _obj; } } protected override BaseModel getModel() { return _obj; } /// /// get all data /// public DataSet getAllData() { return _obj.Query(); } /// /// get all data /// public DataSet getAllActiveData() { return _obj.QueryActived(); } /// /// get a record by id /// public void initialize(int id) { _obj = id != 0 ? new WmsOutPickLable(id) : new WmsOutPickLable(); } /// /// get a record by id 0 /// public void initialize() { initialize(0); } /// /// get a record by id /// public void initialize(DataRow dr) { _obj = new WmsOutPickLable(dr); } //begin cust db operation, query, excute sql etc. /// /// update in a transaction scrop /// public void update() { if (valid()) { using (TransactionScope scope = new TransactionScope()) { //Node tmp = new Node(); //tmp.parentid = 1; //tmp.name = "test trans" + DateTime.Now; //tmp.description = "this is for transTest"; //tmp.Add(); _obj.Update(); scope.Complete(); } } } private bool valid() { return true; } } }