public void ModifyStockList(string stockID, string oldCode, string newCode) { char[] splitArr = { ',', ',' }; string[] stockListStr = newCode.Split(splitArr); StockModel sm = bllStock.GetModel(long.Parse(stockID)); if (sm == null)//没有库存信息 { return; } List <StockListModel> stockList = bllStockList.GetListByStockID(long.Parse(stockID)); if (stockList.Count != stockListStr.Length) { this.view.AddLog("库存管理", "料框条码个数错误!", LogInterface.EnumLoglevel.提示); return; } for (int i = 0; i < stockList.Count; i++) { StockListModel slm = stockList[i]; if (stockListStr.Length > i) { slm.MeterialboxCode = stockListStr[i]; bllStockList.Update(slm); } } this.view.AddLog("库存管理", "库存料框条码由:" + oldCode + "手动修改为:" + newCode, LogInterface.EnumLoglevel.提示); //RefreshStockList(long.Parse(stockID)); QueryStock(this.currHouseName, this.currHouseArea, this.currRowth, this.currColth, this.currLayerth, this.gsStatus, this.gsTaskSta, this.currProBatch, this.isChecked, this.materialBoxCode); }
public void ModifyStockCode(long stockListID, long gsID, string boxCode) { StockListModel slm = bllStockList.GetModel(stockListID); if (slm == null) { return; } slm.MeterialboxCode = boxCode; bllStockList.Update(slm); GetGSDetail(gsID); }