public StockInShopData GetStockOutData(string requisitionCode, double currentStockIn) { double stockOut = 0; ABB.Data.Search.StockOutProductSearchData searchData = new ABB.Data.Search.StockOutProductSearchData(); searchData.REQUISITIONCODEFROM = requisitionCode; searchData.REQUISITIONCODETO = requisitionCode; DataTable dtSearch = GetStockOutList(searchData, currentStockIn); if (dtSearch.Rows.Count == 1) { stockOut = Convert.ToDouble(dtSearch.Rows[0]["STOCKOUT"]); } StockInShopData data = new StockInShopData(); StockOutDAL sDAL = new StockOutDAL(); sDAL.TableName = "STOCKOUT" + Constz.ABBSERV + ""; sDAL.GetDataByLOID(stockOut, null); data.CODE = sDAL.CODE; data.RECEIVER = sDAL.RECEIVER; data.REFLOID = sDAL.LOID; data.SENDER = sDAL.RECEIVER; RequisitionDAL rDAL = new RequisitionDAL(); rDAL.TableName = "REQUISITION" + Constz.ABBSERV + ""; rDAL.GetDataByLOID(sDAL.REFLOID, null); data.REQUISITIONCODE = rDAL.CODE; DataTable dt = SearchObj.GetStockOutProductList(stockOut); int i = 1; foreach (DataRow dRow in dt.Rows) { dRow["ORDERNO"] = i; i += 1; } data.ITEM = dt; return data; }
public StockInShopData GetStockOutData(double stockOut) { StockInShopData data = new StockInShopData(); StockOutDAL sDAL = new StockOutDAL(); sDAL.TableName = "STOCKOUT" + Constz.ABBSERV + ""; sDAL.GetDataByLOID(stockOut, null); data.CODE = sDAL.CODE; data.RECEIVER = sDAL.RECEIVER; data.REFLOID = sDAL.LOID; data.SENDER = sDAL.RECEIVER; RequisitionDAL rDAL = new RequisitionDAL(); rDAL.TableName = "REQUISITION" + Constz.ABBSERV + ""; rDAL.GetDataByLOID(sDAL.REFLOID, null); data.REQUISITIONCODE = rDAL.CODE; DataTable dt = SearchObj.GetStockOutProductList(stockOut); int i = 1; foreach (DataRow dRow in dt.Rows) { dRow["ORDERNO"] = i; i += 1; } data.ITEM = dt; return data; }