public PETContext() { PETDS = new PETDataSet(); _myTAM = new PETDataSetTableAdapters.TableAdapterManager(); _myTAM.BackupDataSetBeforeUpdate = false; _myTAM.UpdateOrder = PETDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; //加入Table Adapter _myTAM.TB_PET_TARGETTableAdapter = new PETDataSetTableAdapters.TB_PET_TARGETTableAdapter(); _myTAM.TB_PET_SUPERVISETableAdapter = new PETDataSetTableAdapters.TB_PET_SUPERVISETableAdapter(); }
public void QueryPetitionDatasByWKF(string No, DataTable dt) { //string cmdTxt = @"select * from TB_PET_PETITION where ORDERNO = @ORDERNO"; dt = new PETDataSet().TB_PET_PETITION; string cmdTxt = @"select p.*"; cmdTxt += @" from TB_PET_PETITION p"; cmdTxt += @" inner join TB_KD_ORDERS o on o.OrderNo = p.ORDERNO"; cmdTxt += @" inner join TB_REW_CARMODEL cm on cm.CAR_CODE = o.CarCod and cm.CAR_MDL = o.CarMdl and cm.CAR_SFX = o.SFX"; cmdTxt += @" where p.ORDERNO = @ORDERNO"; this.m_db.AddParameter("@ORDERNO", No); System.Data.Common.DbDataReader dr = this.m_db.ExecuteReader(cmdTxt); dt.Load(dr); dr.Dispose(); }
public void Update(PETDataSet ds) { _myTAM.UpdateAll(ds); }