| | |
| | | toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick; |
| | | toolBarMenu1.btnFjianYanClick += ToolBarMenu1_btnFjianYanClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | |
| | | if (string.IsNullOrEmpty(_orgId)) |
| | | return; |
| | | txt_suppId.getSuppler(_orgId, _ucGys); |
| | | txt_depotsId.getSuppler(_orgId, _ucCk); |
| | | }; |
| | | //设置仓库选择 |
| | | this.txt_depotsId.EditChanged += (s, e) => |
| | | { |
| | | txtDepotsCode.Text = this.txt_depotsId.GetCode(); |
| | | }; |
| | | //设置供应商选择 |
| | | this.txt_suppId.EditChanged += (s, e) => |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | //选择srm明细 |
| | | txt_paperBillNo.ButtonClick += (s, e) => |
| | | { |
| | | string strSrmNo = ""; |
| | | SelectSrm frm = new SelectSrm(); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | strSrmNo = lst[0].guid; |
| | | txt_paperBillNo.Text = strSrmNo; |
| | | txt_receiveOrgId.SetIdOrCode(lst[0].receiveOrgId); |
| | | txt_suppId.SetIdOrCode(lst[0].suppId); |
| | | var _obj = new |
| | | { |
| | | inShdh = strSrmNo, |
| | | inP1 = "", |
| | | inP2 = "" |
| | | }; |
| | | var strReturn = UtilityHelper.HttpPost("", _webServiceName + "SelectSrmTo", JsonConvert.SerializeObject(_obj)); |
| | | var dt = UtilityHelper.ReturnToList(strReturn); |
| | | DataTable _newTable = dt.rtnData; |
| | | DataTable _oldTable = (DataTable)gcMx1.DataSource; |
| | | DataRow[] sourceRows = _newTable.Select(); |
| | | for (int i = 0; i < sourceRows.Length; i++) |
| | | { |
| | | _oldTable.ImportRow(sourceRows[i]); |
| | | } |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = _oldTable; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | } |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 反检验 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnFjianYanClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk("EditModelSubmitF"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 检验 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk("EditModelSubmit"); |
| | | } |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk("EditModelSubmitF"); |
| | | } |
| | | /// <summary> |
| | | /// 取消事件 |
| | |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_receiveOrgId); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | string _orgId = txt_receiveOrgId.GetId(); |
| | | string _ckId = txt_depotsId.GetId(); //仓库编号 depots_code |
| | | string _gysId = txt_suppId.GetId(); //供应商编号 |
| | | if (string.IsNullOrEmpty(_orgId)) |
| | | { |
| | | MsgHelper.Warning("请选择收料组织!"); |
| | | MsgHelper.ShowError("请选择收料组织!"); |
| | | txt_receiveOrgId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_gysId)) |
| | | { |
| | | MsgHelper.Warning("请选择供应商!"); |
| | | MsgHelper.ShowError("请选择供应商!"); |
| | | txt_suppId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_ckId)) |
| | | { |
| | | MsgHelper.Warning("请选择仓库!"); |
| | | txt_depotsId.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | PaperBillNo = txt_paperBillNo.Text.Trim(), //送货单号; |
| | | Remark = txt_remark.Text.Trim(), //备注 |
| | | SuppId = _gysId, //供应商 |
| | | DepotsId = _ckId,//仓库 |
| | | OrgId = _orgId, |
| | | list = new List<dynamic>(), |
| | | }; |
| | |
| | | _webServiceName + "EditModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | lbGuid.Text = _rtn.rtnData.outGuid; |
| | | txt_billNo.Text = _rtn.rtnData.outNo; |
| | | toolBarMenu1.isSetBtn = true; |
| | |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | |
| | | } |
| | | var lst = new List<string>(); |
| | | lst.Add(mxGuid); |
| | | |
| | | var _obj = lst; |
| | | try |
| | | { |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | } |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | |
| | | HistoryDhmxcs frm = new HistoryDhmxcs(mxGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | } |
| | | } |