| | |
| | | Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | _setIno(); |
| | | } |
| | | private void _setIno() |
| | | { |
| | | this.txt_itemId.KeyFile = "id"; |
| | | this.txt_suppNo.KeyFile = "suppNo"; |
| | | txt_itemId.EditChanged += (s, e) => |
| | | { |
| | | txt_itemNo.Text = this.txt_itemId.GetCode(); |
| | | var ItemId = this.txt_itemId.GetId(); |
| | | var ItemName = this.txt_itemId.GetName(); |
| | | GetCount(ItemId, ItemName); |
| | | }; |
| | | } |
| | | |
| | | private void GetCount(string ItemId,string ItemName) |
| | | { |
| | | //string rowGuid = "", rowName = ""; |
| | | //(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1); |
| | | //if (string.IsNullOrEmpty(rowGuid)) |
| | | //{ |
| | | // ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetCount", JsonConvert.SerializeObject(ItemId)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | MsgHelper.Warning("提示:"+ ItemName+"这个物料已经维护了免检数据"); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (string.IsNullOrEmpty(txt_itemNo.Text.Trim())) |
| | | string _ItemId = txt_itemId.GetId(); |
| | | string _suppNo = txt_suppNo.GetCode(); |
| | | if (string.IsNullOrEmpty(_ItemId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("物料编码不能为空!"); |
| | | // txt_account.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择物料!"); |
| | | txt_itemId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_suppNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择供应商!"); |
| | | txt_suppNo.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new MesQaMj |
| | | { |
| | | Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | ItemId = Convert.ToInt32(txt_itemId.Text.Trim()), |
| | | ItemNo = txt_itemNo.Text.Trim(), |
| | | ItemId = Convert.ToInt32(_ItemId), |
| | | ItemNo = txt_itemId.GetCode(), |
| | | SuppNo= _suppNo, |
| | | }; |
| | | try |
| | | { |
| | |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_itemId, gridView1); |
| | | lbGuid, txt_itemNo, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | } |
| | | |
| | |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_itemId, gridView1); |
| | | lbGuid, txt_itemNo, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | } |
| | | } |