/// <summary> /// 查询仓库入库单据主表上报 /// </summary> public string FindInMasterBill() { string tag = "上报仓库入库单据主表成功!"; using (PersistentManager dbpm = new PersistentManager("ZYDB2Connection")) { UploadDao dao = new UploadDao(); dao.SetPersistentManager(dbpm); DataTable inMasterTable = this.QueryInMasterBill(); if (inMasterTable.Rows.Count > 0) { try { dbpm.BeginTransaction(); dao.InsertInMasterBill(inMasterTable); this.UpdateInMaster(""); dbpm.Commit(); } catch (Exception exp) { dbpm.Rollback(); throw new Exception(exp.Message); } } else { tag = "没有新的仓库入库信息要上报!"; } } return(tag); }
//入库主表 public void InsertInMasterBill(DataSet busiStock) { using (PersistentManager pm = new PersistentManager("ZYDB2Connection")) { UploadDao dao = new UploadDao(); dao.SetPersistentManager(pm); dao.InsertInMasterBill(busiStock); } }