private void Allot(DataRow rowDetail) { AllotBll allotBll = new AllotBll(); productCode = rowDetail["PRODUCTCODE"].ToString(); productName = rowDetail["PRODUCTNAME"].ToString(); productPieceUnitCode = allotBll.FindProductPieceUnitCode(productCode); productPieceUnitName = allotBll.FindUnitName(productPieceUnitCode); productPieceUnitStandardRate = allotBll.FindUnitStandardRate(productPieceUnitCode); productBarUnitCode = allotBll.FindProductBarUnitCode(productCode); productBarUnitName = allotBll.FindUnitName(productBarUnitCode); productBarUnitStandardRate = allotBll.FindUnitStandardRate(productBarUnitCode); maxQuantity = allotBll.FindProductMaxQuantity(productCode); shelfCode = allotBll.FindProductAssignedCell(productCode); isUseSmallPieceArea = allotBll.FindIsUseArea(this.smallPieceAreaAreaType); isUseSmallBarArea = allotBll.FindIsUseArea(this.smallBarAreaAreaType); entryOrderQuantity = Convert.ToDecimal(rowDetail["INPUTQUANTITY"]); entryOrderUnitCode = rowDetail["UNITCODE"].ToString(); entryOrderUnitName = allotBll.FindUnitName(entryOrderUnitCode); entryOrderUnitStandardRate = allotBll.FindUnitStandardRate(entryOrderUnitCode); entryOrderPieceQuantity = Math.Floor((entryOrderQuantity * entryOrderUnitStandardRate) / productPieceUnitStandardRate); entryOrderBarQuantity = ((entryOrderQuantity * entryOrderUnitStandardRate) % productPieceUnitStandardRate) / productBarUnitStandardRate; Allot(rowDetail, entryOrderPieceQuantity, entryOrderBarQuantity); }
/// <summary> /// 库存调拨查询List /// </summary> private void StoreProductList() { int page = Convert.ToInt32(HttpContext.Current.Request.QueryString["page"]); int limit = Convert.ToInt32(HttpContext.Current.Request.QueryString["limit"]); string ShopName = HttpContext.Current.Request.QueryString["ShopName"]; object tab = AllotBll.StoreProductList(page, limit, ShopName); javaScriptSerializer(tab); }
/// <summary> /// 仓库商品调拨操作 /// </summary> private void StoreProductDB() { string ListShopId = HttpContext.Current.Request.QueryString["ListShopId"]; //调拨商品ID string dbListNumber = HttpContext.Current.Request.QueryString["dbListNumber"]; //调拨数量 string ListNumber = HttpContext.Current.Request.QueryString["ListNumber"]; //库存数量 string ListStoreId = HttpContext.Current.Request.QueryString["ListStoreId"]; //被调拨仓库Id int StoreId = Convert.ToInt32(HttpContext.Current.Request.QueryString["StoreId"]); //调拨到仓库Id var obj = new { code = 201, msg = AllotBll.StoreProductDB(ListShopId, dbListNumber, ListNumber, ListStoreId, StoreId) }; javaScriptSerializer(obj); }
public DataTable Allot() { try { AllotBll allotBll = new AllotBll(); tableAvailableCell = allotBll.FindDeliveryAvailableCell(); tableAllotment = allotBll.GetEmptyAllotmentTable("OUT"); tableMoveDetail = allotBll.GetEmptyMoveDetailTable(); for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++) { DataRow rowDetail = dsDetail.Tables[0].Rows[i]; Allot(rowDetail); } } catch (Exception e) { this.errorlist.Add("--出库分配出错!详情:" + e.Message); } return(tableAllotment); }
public DataTable Allot() { try { AllotBll allotBll = new AllotBll(); tableAvailableCell = allotBll.FindAvailableCell(); tableAllotment = tableAvailableCell.Clone(); for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++) { DataRow rowDetail = dsDetail.Tables[0].Rows[i]; Allot(rowDetail); } } catch (Exception e) { this.errorlist.Add("--入库分配出错!详情:" + e.Message); } return(tableAllotment); }