public static bool UpdateOrderCount(string _orderNo, string _productNo, int _updatedOrderCount) { int originalOrderCount = OrderInfoBLL.GetOrderCountByOrderNo(_orderNo); return(OrderInfoBLL.OrderInfoUpdate(_orderNo, _productNo, _updatedOrderCount + originalOrderCount) && ProductionLineInfoBLL.UpdateOrderNoForProductionLine(_orderNo, _productNo, _updatedOrderCount + originalOrderCount)); }
public static void RemoveOrderAndProductionLineInfo(byte _productLineNo, string _orderNo) { if (_productLineNo > 0 && _productLineNo < 10 && _orderNo.Length > 0) { ProductionLineInfoBLL.DeleteProductionLineInfo(_productLineNo, _orderNo); } }
public static void AddOrderAndProductionLineInfo(byte _productLineNo, string _orderNo, int _orderCount, string _productNo) { if (_productLineNo > 0 && _productLineNo < 10 && _orderNo.Length > 0 && _orderCount > 0 && _productNo.Length > 0) { ProductionLineInfoBLL.InsertProductionLineInfo(_productLineNo, _orderNo, _orderCount, _productNo); } }
public static void CheckProductionLineExsit(string _orderNo, byte _productLineNo, string _productNo, int _orderCount) { try { if (!ProductionLineInfoBLL.ExistThisProductionLineInfo(_productLineNo, _orderNo)) { //byte _productionLineNo, string _orderNo, int _orderCount, string _productNo ProductionLineInfoBLL.InsertProductionLineInfo(_productLineNo, _orderNo, _orderCount, _productNo); return; } } catch { } }
private void UpdateProductionLineInfo() { if ((this.textProdNo.Text.Trim().Length > 0) && (RegularHelper.isNumericString(this.textOrderCount.Text.Trim().ToString()))) {//string _orderNo, byte _productLineNo, string _productNo, int _orderCount ProductionLine.CheckProductionLineExsit(this.txtOrderNo.Text.Trim(), Login.CurrentProductionLineNumber, this.textProdNo.Text.Trim(), int.Parse(this.textOrderCount.Text.Trim().ToString())); if (!ProductionLineInfoBLL.CheckThisProductionLineInfo(Login.CurrentProductionLineNumber, this.txtOrderNo.Text.Trim())) //如果当前产线号存在 productionline表里,需要double check order号是否也一样? 如果一样则OK, 如果不一样,则需要告警:还没切线呢 { SpMessageBox.Show("当前产线还未切线,不能输入进行新订单生产,请先执行切线操作", "订单查询"); } } else { SpMessageBox.Show("请检查是否输入了正确的订单号和产品号.", "订单查询"); } }