private void 修改退库类别ToolStripMenuItem_Click(object sender, EventArgs e) { if (!CheckSelectedRow()) { return; } if (!CheckDataItem()) { return; } if (dataGridView1.SelectedRows[0].Cells["质量工程师签名"].Value.ToString() != BasicInfo.LoginName) { MessageDialog.ShowPromptMessage("只能修改本人签名的记录"); return; } S_MaterialReturnedInTheDepot bill = m_billServer.GetBill(txtBill_ID.Text); bill.ReturnType = cmbType.Text; if (!m_billServer.UpdateBill(bill, out m_queryResult, out m_error)) { MessageDialog.ShowErrorMessage(m_error); } RefreshDataGridView(m_queryResult); PositioningRecord(bill.Bill_ID); }
/// <summary> /// 构造函数 /// </summary> /// <param name="operateMode">操作模式</param> /// <param name="billNo">领料退库单号</param> public FormMaterialListReturnedInTheDepot(CE_BusinessOperateMode operateMode, string billNo) { InitializeComponent(); S_MaterialReturnedInTheDepot tempBill = m_serverBill.GetBill(billNo); m_lnqWSCode = tempBill == null? m_serverWSBasic.GetPersonnelWorkShop(BasicInfo.LoginID) : m_serverWSBasic.GetPersonnelWorkShop(tempBill.FillInPersonnelCode); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); UpdateStyles(); m_operateMode = operateMode; m_billNo = billNo; if (m_operateMode == CE_BusinessOperateMode.查看) { toolStrip1.Visible = false; } else if (m_operateMode == CE_BusinessOperateMode.仓库核实) { btnAdd.Enabled = false; btnDelete.Enabled = false; btnDeleteAll.Enabled = false; txtShelf.ReadOnly = false; txtColumn.ReadOnly = false; txtLayer.ReadOnly = false; } m_queryGoodsInfo = m_goodsServer.GetGoods(m_billNo); RefreshDataGridView(m_queryGoodsInfo); // 添加数据定位控件 m_dataLocalizer = new UserControlDataLocalizer( dataGridView1, this.Name, UniversalFunction.SelectHideFields( this.Name, dataGridView1.Name, BasicInfo.LoginID)); panelTop.Controls.Add(m_dataLocalizer); m_dataLocalizer.Dock = DockStyle.Bottom; m_strStorage = m_serverStorageInfo.GetStorageID(billNo, "S_MaterialReturnedInTheDepot", "Bill_ID"); if (m_strStorage == "05") { label11.Visible = true; cmbProductStatus.Visible = true; } if (!Convert.ToBoolean(BasicInfo.BaseSwitchInfo[(int)GlobalObject.CE_SwitchName.开启车间管理模块]) || m_strStorage == "11") { btnProvider.Visible = false; btnBatchNo.Visible = false; } }