| | |
| | | using DevExpress.DataAccess.Wizard.Model; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.Entity; |
| | |
| | | using System.IO; |
| | | using System.Net.Http; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Controls; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm |
| | |
| | | gvMx2.OptionsFind.ShowSearchNavButtons = false; |
| | | gvMx2.OptionsView.ShowGroupPanel = false; |
| | | _setIno(); |
| | | txtJianYan.KeyDown += TxtJianYan_KeyDown; |
| | | } |
| | | |
| | | |
| | | private void TxtJianYan_KeyDown(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyCode == Keys.Enter) |
| | | { |
| | | string _strCmd = txtJianYan.Text.Trim().ToUpper(); |
| | | string _strOK = "OK"; |
| | | string _strNG = "NG"; |
| | | if (!(_strCmd.StartsWith(_strOK) || _strCmd.StartsWith(_strNG))) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | if (!_strCmd.Contains("-")) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:缺少 中画线!"); |
| | | return; |
| | | } |
| | | string[] _ary = _strCmd.Split('-'); |
| | | if (_ary.Length != 2) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误::请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | string _str1 = _ary[0]; |
| | | if (!(_str1 == _strOK || _str1 == _strNG)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | string _str2 = _ary[1]; |
| | | int n; |
| | | if (int.TryParse(_str2, out n)) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | for (int i = 0; i < gvMx2.DataRowCount; i++) |
| | | { |
| | | gvMx2.SetRowCellValue(i, "fcheckResu", _str1); |
| | | gvMx2.SetRowCellValue(i, "fstand", _str1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 双击事件 |
| | |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | lbGuid.Text = strGuid; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list"]) |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list5"]) |
| | | { |
| | | array.Add(a); |
| | | } |
| | | DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); |
| | | DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMx1.BindingContext = new BindingContext(); |
| | |
| | | /// <param name="e"></param> |
| | | private void GvMx1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) |
| | | { |
| | | var rowGuid = ""; |
| | | var myDataRow = gvMx1.GetDataRow(e.FocusedRowHandle); |
| | | if (myDataRow == null) return; |
| | | rowGuid = myDataRow["id"].ToString(); |
| | | var json = JsonConvert.SerializeObject(rowGuid); |
| | | var _obj = new |
| | | { |
| | | parentGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | guid = UtilityHelper.ToGuid(myDataRow["guid"].ToString()), //主建 |
| | | //id = myDataRow["id"].ToString(), |
| | | id = -1, |
| | | checkQyt = myDataRow["checkQyt"].ToString(), |
| | | chkItem = myDataRow["fcheckItem"].ToString() |
| | | }; |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", _webServiceName+ "GetCheckResultList", json); |
| | | var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetCheckResultList12", JsonConvert.SerializeObject(_obj)); |
| | | var dd = UtilityHelper.ReturnToList(strReturn); |
| | | var dt = dd.rtnData; |
| | | gcMx2.BindingContext = new BindingContext(); |