private void btnStartRemoval_Click(object sender, EventArgs e) { if (CheckPutinSetIsCorrect() == false) { DlgHelper.ShowAlertMsgBox("出库设置信息错误,请检查设置!", true); return; } var removalOrder = new WebRemovalWarehouseOrder() { SpeedChangeBoxName = ((WebSpeedChangeBoxType)cbxProductType.SelectedItem).SpeedChangeBoxName, DispathPlace = cbxDispathPlace.Text, Staff = txtRemovalUserName.Text, PlanCount = int.Parse(txtCountLimit.Text), }; var result = RemovalWarehouseBLL.SaveRemalWarehouseOrder(removalOrder); if (result.Code > 0) { DlgHelper.ShowAlertMsgBox(result.Msg); return; } _currentOrderID = result.Data; btnRemovalSet.Enabled = false; btnStartRemoval.Enabled = false; btnStopRemoval.Enabled = true; txtBarCode.Text = ""; SetCountStatisticText(0, true); txtBarCode.Focus(); }
private void dgvPutinRecord_CellContentClick(object sender, DataGridViewCellEventArgs e) { int columnIndex = e.ColumnIndex; int rowIndex = e.RowIndex; if (rowIndex == -1) { return; } var clickColumn = dgvPutinRecord.Columns[columnIndex]; var id = (int)dgvPutinRecord.Rows[rowIndex].Cells["RecordID"].Value; if (clickColumn == dgvPutinRecord.Columns["PrintTwoCode"]) { var twoCode = new RemovalWarehouseBLL().TwoDimensionCodeByBarID(id); if (twoCode.Code > 0) { DlgHelper.ShowAlertMsgBox(twoCode.Msg); return; } var resultPrintStr = ConfigHelper.TwoCodePre + DateTime.Now.ToString() + "^" + twoCode.Data; new PutinWarehouse().Print(resultPrintStr); } }
private void txtBarCode_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != 13) { if (_isScanOnefinished == true) { txtBarCode.Text = ""; _isScanOnefinished = false; } txtBarCode.Text = txtBarCode.Text + e.KeyChar; return; } if (btnStartRemoval.Enabled == true) { DlgHelper.ShowAlertMsgBox("请进行出库设置并点击开始入库后,再开始出库操作!", true); txtBarCode.Text = ""; return; } _isScanOnefinished = true; var twoDimensionCode = txtBarCode.Text; var planTotalCount = int.Parse(txtCountLimit.Text.Trim()); var currentTotalCount = (int)lblCountStatistic.Tag; int containCount = 0; var saveRemovalResult = RemovalWarehouseBLL.SaveRemalWarehouseInfo(out barCodeList, out containCount, twoDimensionCode, _currentOrderID, ((WebSpeedChangeBoxType)cbxProductType.SelectedItem).SpeedChangeBoxTypeID , planTotalCount, currentTotalCount); if (saveRemovalResult != RemovalResultEnum.执行成功) { if (saveRemovalResult == RemovalResultEnum.变速箱型号不一致) { //报警 new AlarmForm(RemovalResultEnum.变速箱型号不一致.ToString(), AlarmType.出库报警).ShowDialog(); return; } else if (saveRemovalResult == RemovalResultEnum.当前出库数量已经大于设置的出库数量) { new AlarmForm(RemovalResultEnum.当前出库数量已经大于设置的出库数量.ToString(), AlarmType.出库报警).ShowDialog(); var dlgResult = DlgHelper.ShowConfirmMsgBox("是否继续将超出的数量出库?"); if (dlgResult == DialogResult.Yes) { RemovalWarehouseBLL.SaveRemalWarehouseInfo(out barCodeList, out containCount, twoDimensionCode, _currentOrderID, ((WebSpeedChangeBoxType)cbxProductType.SelectedItem).SpeedChangeBoxTypeID , planTotalCount, currentTotalCount, true); } else { return; } } else { DlgHelper.ShowAlertMsgBox(saveRemovalResult.ToString(), true); return; } } SetCountStatisticText(containCount, false); }
private void OrderDetailForm_Load(object sender, EventArgs e) { int totalCount = 0; var result = new RemovalWarehouseBLL().GetRemovalWarehouseInfoListByOrderID(_orderID, out totalCount, "", 1, -1); if (result.Code > 0) { DlgHelper.ShowAlertMsgBox(result.Msg); return; } dgvRemovalOrderDetailRecord.AutoGenerateColumns = false; dgvRemovalOrderDetailRecord.DataSource = result.Data; }
private int PageChange(int pageIndex, int pageSize) { _firstIndex = (pageIndex - 1) * pageSize + 1; var warehouseBLL = new RemovalWarehouseBLL(); int totalCount; var result = warehouseBLL.GetRemovalWarehouseOrderList(out totalCount, txtSearchKey.Text.Trim(), pageIndex, pageSize, currentOrderBy, ascding, searchStartTime.Value, searchEndTime.Value); dgvRemovalOrderRecord.DataSource = result.Data; return(totalCount); }