| | |
| | | lst = ee.StringList; |
| | | string strReturn = ""; |
| | | ReturnModel<DataTable> dt; |
| | | DataTable _oldTable = (DataTable)gcMx1.DataSource; |
| | | #region 这是Srm来的单子 |
| | | if (lst == null) |
| | | { |
| | |
| | | gvMx1quantity.OptionsColumn.ReadOnly = true; |
| | | txt_paperBillNo.ReadOnly = true; |
| | | txt_isSrm.Checked = true; |
| | | DataTable _newTable = dt.rtnData; |
| | | _oldTable = _newTable; |
| | | } |
| | | #endregion |
| | | #region 这是普通的单 |
| | |
| | | gvMx1quantity.OptionsColumn.ReadOnly = false; |
| | | txt_paperBillNo.ReadOnly = false; |
| | | txt_isSrm.Checked = false; |
| | | DataTable _newTable = dt.rtnData; |
| | | DataRow[] sourceRows = _newTable.Select(); |
| | | for (int i = 0; i < sourceRows.Length; i++) |
| | | { |
| | | _oldTable.ImportRow(sourceRows[i]); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | 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(); |
| | |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); |
| | | } |
| | | //2025/07/12加上修改状态下不能修改供应商和组织srm,禁用 |
| | | setSrm(); |
| | | txt_receiveOrgId.IsReadly = true; |
| | | txt_suppId.IsReadly = true; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_receiveOrgId); |
| | | setSrm(false); |
| | | txt_isSrm.Checked = false; |
| | | setSrm(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | } |
| | | //如果是srm,禁用 |
| | | if (txt_isSrm.Checked) |
| | | { |
| | | setSrm(true); |
| | | } |
| | | else { |
| | | setSrm(false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | _webServiceName + _meth, |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg); |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnData.outMsg); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | |
| | | int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1); |
| | | UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnData.outMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | private void setSrm(bool isSrm) { |
| | | private void setSrm() |
| | | { |
| | | bool isSrm = (txt_isSrm.Checked); |
| | | if (isSrm == true) |
| | | { |
| | | gvMx1quantity.OptionsColumn.ReadOnly = true; |
| | | txt_paperBillNo.ReadOnly = true; |
| | | txt_isSrm.Checked = true; |
| | | txt_receiveOrgId.Enabled = false; |
| | | txt_suppId.Enabled = false; |
| | | txt_receiveOrgId.IsReadly = true; |
| | | txt_suppId.IsReadly = true; |
| | | btnSelect.Enabled = false; |
| | | } |
| | | else { |
| | | else |
| | | { |
| | | gvMx1quantity.OptionsColumn.ReadOnly = false; |
| | | txt_paperBillNo.ReadOnly = false; |
| | | txt_isSrm.Checked = false; |
| | | txt_receiveOrgId.Enabled = true; |
| | | txt_suppId.Enabled = true; |
| | | txt_receiveOrgId.IsReadly = false; |
| | | txt_suppId.IsReadly = false; |
| | | btnSelect.Enabled = true; |
| | | } |
| | | } |