From 2bd67e306a595ffec3e746db2f101fc9319880b2 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 11 十一月 2024 19:40:45 +0800
Subject: [PATCH] 1
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs | 123 ++++++++++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 26 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs
index 5a0acf7..e01e3ab 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs
@@ -31,6 +31,9 @@
toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+ toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+ toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
getPageList(1, UtilityHelper.GetPageSize());
pageBar1.PagerEvent += PageBar1_PagerEvent;
@@ -100,7 +103,61 @@
_filterList = e.FilterList;
getPageList(1, pageBar1.RowsCount);
}
+ /// <summary>
+ /// 鎵瑰噯
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnPiZhunClick(object sender, EventArgs e)
+ {
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_itemNo, gridView1);
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", _webServiceName + "Approval", JsonConvert.SerializeObject(rowGuid));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ UtilityHelper.JumpToTab(xtraTabControl1, 0);
+ getPageList(1, UtilityHelper.GetPageSize());
+ }
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+ /// <summary>
+ /// 鍙嶅鏍�
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_itemNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ }
+
+ /// <summary>
+ /// 瀹℃牳浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_itemNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ }
/// <summary>
/// 鍙栨秷浜嬩欢
/// </summary>
@@ -204,11 +261,11 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- string _ItemId = txt_itemId.GetId()
-; if (string.IsNullOrEmpty(_ItemId))
+ string _ItemId = txt_ItemId.GetId()
+; if (string.IsNullOrEmpty(_ItemId))
{
MsgHelper.Warning("璇烽�夋嫨鐗╂枡锛�");
- // txt_account.Focus();
+ txt_ItemId.Focus();
return;
}
gvMx1.CloseEditor();
@@ -220,28 +277,31 @@
if (row != null)
lst.Add(new MesQmCheckitemDt
{
- Guid = null,
+ Guid = UtilityHelper.ToGuid(row["guid"].ToString()),
Forder = 1,
FcheckItem = row["FcheckItem"].ToString(),
SampleSizeNo = row["SampleSizeNo"].ToString(),
- FcheckTool= row["FcheckTool"].ToString(),
+ FcheckTool = row["FcheckTool"].ToString(),
FcheckLevel = row["FcheckLevel"].ToString(),
Fstand = row["Fstand"].ToString(),
FacLevel = row["FacLevel"].ToString(),
+ FspecRequ = row["FspecRequ"].ToString(),
+ Memo = row["memo"].ToString(),
+ FupAllow = row["FupAllow"].ToString(),
+ FdownAllow = row["FdownAllow"].ToString(),
});
}
var _obj = new MesQmCheckitem
{
- Guid = lbGuid.Text.Trim().Length > 0
- ? Guid.Parse(lbGuid.Text.Trim())
- : Guid.Empty,
+ Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
+ ItemId= long.Parse( _ItemId),
Memo = txt_memo.Text.Trim(),
- ItemNo =txt_itemNo.Text.Trim(),
- IsEnabled = txt_isenabled.Checked,
+ ItemNo = txt_itemNo.Text.Trim(),
+ Isenabled = txt_isenabled.Checked,
+ Ftype= "1",
list = lst
};
-
try
{
var strJson = UtilityHelper.HttpPost("",
@@ -254,8 +314,10 @@
{
lbGuid.Text = _rtn.rtnData;
toolBarMenu1.isSetBtn = true;
- UtilityHelper.ChangeEnableByControl(panel1.Controls,
- false);
+ var gridViews = new List<GridView>();
+ gridViews.Add(gvMx1);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, false,
+ gridViews);
}
}
catch (Exception ex)
@@ -282,7 +344,8 @@
try
{
var strReturn = UtilityHelper.HttpPost("",
- _webServiceName + "GetListPageIQC", json);
+ // _webServiceName + "GetListPageIQC", json);
+ _webServiceName + "GetListPage", json);
var dd =
UtilityHelper.ReturnToTablePage(strReturn);
if (dd.rtnCode > 0)
@@ -325,7 +388,8 @@
try
{
var strJson = UtilityHelper.HttpPost("",
- _webServiceName + "GetModelIQC",
+ // _webServiceName + "GetModelIQC",
+ _webServiceName + "GetModel",
JsonConvert.SerializeObject(_obj));
var _rtn =
UtilityHelper.ReturnToDynamic(strJson);
@@ -423,11 +487,11 @@
private void _setIno()
{
- txt_itemId.KeyFile = "id";
- txt_itemId.EditChanged += (s, e) =>
+ txt_ItemId.KeyFile = "id";
+ txt_ItemId.EditChanged += (s, e) =>
{
- txt_itemModel.Text = this.txt_itemId.GetModel();
- txt_itemNo.Text = this.txt_itemId.GetCode();
+ txt_itemModel.Text = this.txt_ItemId.GetModel();
+ txt_itemNo.Text = this.txt_ItemId.GetCode();
};
btnSelect.Click += (s, e) =>
{
@@ -475,7 +539,6 @@
private void _getListJygj()
{
var json = JsonConvert.SerializeObject("QATOOLS");
-
try
{
var strReturn = UtilityHelper.HttpPost("", "MesSysLookupTypesManager/GetItemList", json);
@@ -507,8 +570,8 @@
var dt = rtn.rtnData.list;
foreach (DataRow dr in dt.Rows)
{
- rptJYBZ.Items.Add(dr["SampleSizeNo"].ToString());
- string ddddd = dr["SampleSizeName"].ToString();
+ rptJYBZ.Items.Add((new CboItemEntity(dr["SampleSizeNo"].ToString(), dr["SampleSizeName"].ToString())));
+ //string ddddd = dr["SampleSizeName"].ToString();
}
}
catch (Exception ex)
@@ -552,10 +615,10 @@
,"4.鐗规畩妫�楠屾按骞�(S1)"
,"5.鐗规畩妫�楠屾按骞�(S2)"
,"6.鐗规畩妫�楠屾按骞�(S3)"
- ,"7.鐗规畩妫�楠屾按骞�(S4),"
+ ,"7.鐗规畩妫�楠屾按骞�(S4)"
});
}
-
+
/// <summary>
/// 鍏宠仈妫�楠屾爣鍑嗗悕绉�
/// </summary>
@@ -566,12 +629,20 @@
ComboBoxEdit comboBox = sender as ComboBoxEdit;
if (comboBox != null)
{
+ CboItemEntity _itm = comboBox.EditValue as CboItemEntity;
+ string _val = _itm.Value.ToString();
+ string _txt = _itm.Text.ToString();
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
GridView myView = (gcMx1.MainView as GridView);
int dataIndex = myView.GetDataSourceRowIndex(myView.FocusedRowHandle);
- myView.SetRowCellValue(dataIndex, "sampleSizeName", "sdf");
- myView.SetRowCellValue(dataIndex, "gridColumn6", "sdf");
+ myView.SetRowCellValue(dataIndex, "sampleSizeNo", _val);
+ myView.SetRowCellValue(dataIndex, "sampleSizeName", _txt);
}
}
+
+
#endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3