public bool Insert() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { ProfitLossBillDetailDao dao = new ProfitLossBillDetailDao(); string sql = string.Format("Insert into WMS_PL_BILLDETAIL (BILLNO,CELLCODE,PRODUCTCODE,QUANTITY,UNITCODE,PRICE,MEMO) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}')" , this.BILLNO, this.CELLCODE, this.PRODUCTCODE, this.QUANTITY, this.UNITCODE, this.PRICE, this.MEMO); dao.SetData(sql); flag = true; } return(flag); }
public bool Update() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { ProfitLossBillDetailDao dao = new ProfitLossBillDetailDao(); string sql = string.Format("update WMS_PL_BILLDETAIL set BILLNO='{1}',CELLCODE='{2}',PRODUCTCODE='{3}',QUANTITY='{4}',UNITCODE='{5}',PRICE='{6}',MEMO='{7}' where ID='{0}'" , this.ID, this.BILLNO, this.CELLCODE, this.PRODUCTCODE, this.QUANTITY, this.UNITCODE, this.PRICE, this.MEMO); dao.SetData(sql); flag = true; } return(flag); }