using DevExpress.XtraEditors; using DevExpress.XtraGrid.Views.Grid; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; using MES.Service.Modes; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Threading.Tasks; using System.Windows.Forms; namespace Gs.DevApp.DevFrm.QC { public partial class Jyxm : DevExpress.XtraEditors.XtraUserControl { private List _filterList = new List(); private readonly string _webServiceName = "MesQmCheckitemManager/"; public string strType = "";//iqc type public decimal dfValue = 1; //iqc的样品数量默认5,否则1 private string dftSsampleSizeName = "GB/T2828.1-2012/ISO";//默认 private string dftSsampleSizeNo = "GB/T2828.1-2012/ISO";//默认 private string dftFcheckLevel = "2.一般检验水平(II)";//默认检验水平 private string dftFacLevel = "2.50---(AQL_0_250)";//默认接收水平 public Jyxm(string _strType) { InitializeComponent(); strType = _strType; } protected override void OnCreateControl() { base.OnCreateControl(); if (Parent == null) return; toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; toolBarMenu1.xlsInService = "XlsInItemJyxm&" + strType; //类型,iqc,ipqc巡检,ipqc首检查,fqc,iqc的样品值默认为5,其它为1 txt_ftype.Text = strType; if (strType == QcSeason.iqc.ToString()) dfValue = 5; //如果是ipqc巡检,显示工位 if (strType != QcSeason.ipqc巡检.ToString()) { gvMx1.Columns["stationName"].Visible = false; } //如果是ipqc首检,显示认证 if (strType != QcSeason.ipqc首检.ToString()) { gvMx1.Columns["isRzxx"].Visible = false; } //新行初始值 this.gvMx1.InitNewRow += (s, e) => { int newIndex = gvMx1.DataRowCount + 1; this.gvMx1.SetRowCellValue(e.RowHandle, "ypsl", dfValue); this.gvMx1.SetRowCellValue(e.RowHandle, "forder", newIndex); this.gvMx1.SetRowCellValue(e.RowHandle, "sampleSizeName", dftSsampleSizeName); this.gvMx1.SetRowCellValue(e.RowHandle, "sampleSizeNo", dftSsampleSizeNo); this.gvMx1.SetRowCellValue(e.RowHandle, "facLevel", dftFacLevel); this.gvMx1.SetRowCellValue(e.RowHandle, "fcheckLevel", dftFcheckLevel); }; this.toolBarMenu1.getXmlConfig(); Form parentForm = this.FindForm(); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1, tips); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, parentForm, "foneChecked", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); }, tips); Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => { getModel(value); }, (value) => { getPageList(this.pageBar1.CurrentPage); }, lbGuid); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; _setIno(); btnCopy.Click += (s, e) => { if ((lbGuid.Text.Trim().Length < 10)) { Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请先保存当前信息!"); return; } if ((txt_foneChecked.Checked == false)) { Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该项目未审核,暂不能复制到其它物料!"); return; } JyxmShowCopy frm = new JyxmShowCopy(lbGuid.Text.Trim(), strType); frm.ShowDialog(); }; } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } /// /// 分页事件 /// /// /// private void PageBar1_PagerEvent(int curPage, int pageSize) { getPageList(curPage); } /// /// 查询事件 /// /// /// private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) { Form parentForm; if (this.Parent is Form) parentForm = this.Parent as Form; else parentForm = this.Parent.Parent as Form; gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; gridView1.ActiveFilter.Clear(); gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; var frm = new ShowFilter(gridView1.Columns, _filterList, parentForm.GetType().FullName); frm.UpdateParent += Frm_UpdateParent; frm.ShowDialog(); } /// /// 查询回调 /// /// /// private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) { _filterList = e.FilterList; getPageList(1); } /// /// 反审核 /// /// /// /// private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) { _toolCk(0); } /// /// 审核事件 /// /// /// private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) { _toolCk(1); } /// /// 取消事件 /// /// /// private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// /// 删除事件 /// /// /// private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) { _toolCk(-1); } /// /// 刷新事件 /// /// /// private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { if (xtraTabControl1.SelectedTabPageIndex == 1) getModel(lbGuid.Text.Trim()); else { //_filterList.Clear(); //if (gridView1.ActiveFilter.Count > 0) //{ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; // gridView1.ActiveFilter.Clear(); // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; //} //getPageList(1); getPageList(this.pageBar1.CurrentPage); } } /// /// 修改事件 /// /// /// private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) { string rowGuid = "", rowName = ""; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("请先选择你要操作的行!"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); if (xtraTabControl1.SelectedTabPageIndex == 1) { getModel(rowGuid); } else { List gvList = new List(); gvList.Add(gvMx1); UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); } } /// /// 新增事件 /// /// /// private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { lbGuid.Text = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); var gridViews = new List(); gridViews.Add(gvMx1); UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } /// /// 保存事件 /// /// /// private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) { toolBarMenu1.isSetBtn = false; string _ItemId = txt_itemId.EditValue.ToString().Trim(); if (string.IsNullOrEmpty(_ItemId)) { MsgHelper.Warning("请选择物料!"); txt_itemId.Focus(); return; } gvMx1.CloseEditor(); gvMx1.PostEditor(); gvMx1.UpdateCurrentRow(); if (gvMx1.DataRowCount <= 0) { MsgHelper.Warning("项目明细不能为空!"); return; } try { var lst = new List(); for (var i = 0; i < gvMx1.DataRowCount; i++) { var row = gvMx1.GetDataRow(i); if (row != null) { if (string.IsNullOrEmpty(row["forder"].ToString())) { MsgHelper.ShowError("顺序不能为空!"); return; } if (string.IsNullOrEmpty(row["FcheckItem"].ToString())) { MsgHelper.ShowError("检验项目不能为空!"); return; } if (string.IsNullOrEmpty(row["FcheckTool"].ToString())) { MsgHelper.ShowError("检验工具不能为空!"); return; } if (string.IsNullOrEmpty(row["SampleSizeNo"].ToString())) { MsgHelper.ShowError("检验标准不能为空!"); return; } if (string.IsNullOrEmpty(row["FcheckLevel"].ToString())) { MsgHelper.ShowError("检验水平不能为空!"); return; } if (string.IsNullOrEmpty(row["FacLevel"].ToString())) { MsgHelper.ShowError("接受水平不能为空!"); return; } if (string.IsNullOrEmpty(row["ypsl"].ToString())) { MsgHelper.ShowError("样品数量平不能为空!"); return; } string _Fstand = row["Fstand"].ToString(); string _FupAllow = row["FupAllow"].ToString(); string _FdownAllow = row["FdownAllow"].ToString(); string _isRzxxTxt = row["isRzxx"].ToString(); bool _isRzxx = false; if (_isRzxxTxt == "1" || _isRzxxTxt.ToUpper() == "true".ToUpper()) _isRzxx = true; //假如三个都为空通过 if (string.IsNullOrEmpty(_Fstand) && string.IsNullOrEmpty(_FupAllow) && string.IsNullOrEmpty(_FdownAllow)) { } else { if (!string.IsNullOrEmpty(_Fstand) && !string.IsNullOrEmpty(_FupAllow) && !string.IsNullOrEmpty(_FdownAllow)) { decimal _Fstand_f = Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_Fstand); decimal _FupAllow_f = Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_FupAllow); decimal _FdownAllow_f = Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_FdownAllow); if (_Fstand_f >= _FdownAllow_f && _Fstand_f <= _FupAllow_f) { } else { MsgHelper.ShowError("标准值必须在上限和下限之间!"); return; } } else { MsgHelper.ShowError("请填写正确的上限,标准值,下限!"); return; } } lst.Add(new MesQmCheckitemDt { Guid = UtilityHelper.ToGuid(row["guid"].ToString()), Forder = int.Parse(row["forder"].ToString()), FcheckItem = row["FcheckItem"].ToString(), SampleSizeNo = row["SampleSizeNo"].ToString(), FcheckTool = row["FcheckTool"].ToString(), FcheckLevel = row["FcheckLevel"].ToString(), Fstand = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["Fstand"].ToString()), FacLevel = row["FacLevel"].ToString(), FspecRequ = row["FspecRequ"].ToString(), Memo = row["memo"].ToString(), FupAllow = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["FupAllow"].ToString()), FdownAllow = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["FdownAllow"].ToString()), ypsl = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["ypsl"].ToString()), stationName = row["stationName"].ToString(), FcheckType = row["FcheckType"].ToString(), isRzxx = _isRzxx, }); } } var _obj = new MesQmCheckitem { Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), ItemId = long.Parse(_ItemId), Memo = txt_memo.Text.Trim(), ItemNo = txt_itemNo.Text.Trim(), Ftype = this.strType, Fversion = 0, list = lst }; try { var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); MsgHelper.Warning("提示:" + _rtn.rtnMsg); if (_rtn.rtnCode > 0) { lbGuid.Text = _rtn.rtnData; toolBarMenu1.isSetBtn = true; var gridViews = new List(); gridViews.Add(gvMx1); UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gridViews); toolBarMenu1.currentAction = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } catch (Exception ex) { MsgHelper.ShowError("提示:" + ex.Message); } } /// /// /// 第几页 /// 每页几条 private void getPageList(int curPage) { gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); _sbSqlWhere += " and b.guid is not null"; _sbSqlWhere += " and a.FTYPE='" + this.strType + "'"; var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,b.item_no asc,a.FVERSION desc", "", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); if (dd.rtnCode > 0) { gcMain1.DataSource = null; DataTable dt = dd.rtnData.list; gcMain1.BindingContext = new BindingContext(); gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; if (dt.Rows.Count > 0) { gcMain1.DataSource = dt; gcMain1.ForceInitialize(); gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain1, gridView1); gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; pageBar1.TotalPages = dd.rtnData.pages;//总页 pageBar1.CurrentPage = curPage;//当前页 pageBar1.RecordCount = dd.rtnData.total;//总记录数 } else { MsgHelper.ShowError("提示:" + dd.rtnMsg); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } /// /// 读取实体 /// /// private void getModel(string strGuid) { bool isEdit = false; if (toolBarMenu1.currentAction == "add") return; if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { MsgHelper.Warning("请先选择你要操作的行!"); return; } var _obj = new { guid = strGuid //主建 }; try { var strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { var dy = _rtn.rtnData; lbGuid.Text = strGuid; var gvList = new List(); gvList.Add(gvMx1); UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); var _job = JObject.Parse(strJson); var array = new JArray(); foreach (var a in _job["rtnData"]["list"]) array.Add(a); var dt = JsonConvert.DeserializeObject(array.ToString()); if (dt.Rows.Count > 0) { gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); gvMx1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); } else { UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } } else { MsgHelper.Warning("提示:" + _rtn.rtnMsg); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } /// /// 工具条事件 /// /// private void _toolCk(int _inFieldValue) { string strMsg = ""; switch (_inFieldValue) { case -1: strMsg = "删除"; break; case 0: strMsg = "反审核"; break; case 1: strMsg = "审核"; break; case 2: strMsg = "批准"; break; }; toolBarMenu1.guidKey = ""; string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemNo"); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("请先选择你要操作的行!"); return; } if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) return; var _obj = new { guid = rowGuid, inFieldValue = _inFieldValue, }; try { var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelSubmit", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_inFieldValue < 0 && _rtn.rtnCode > 0) { if (xtraTabControl1.SelectedTabPageIndex == 0) { getPageList(this.pageBar1.CurrentPage); } else Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); } if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) { getModel(lbGuid.Text.Trim()); } int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); gridView1.FocusedRowHandle = rowHandle; Form parentForm = this.FindForm(); UtilityHelper.SetCheckIco(gridView1, "foneChecked", "foneCheckor", "foneCheckdate", picCheckBox, parentForm, _inFieldValue.ToString()); } MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } #region 以下为种种下拉 private void _setIno() { txt_itemId.Click += (s, e) => { var frm = new JyxmShow(this.strType); frm.UpdateParent += (ss, ee) => { try { var lst = new List(); lst = ee.DynamicList; txt_itemId.Text = lst[0].itemId; txt_gg.Text = lst[0].itemModel; txt_mc.Text = lst[0].itemName; txt_itemNo.Text = lst[0].itemNo; txt_fSubsidiary.Text = lst[0].fSubsidiary; } catch (Exception ex) { MessageBox.Show(ex.Message); } }; frm.ShowDialog(); }; _getListJyxm(); _getListJygj(); _getListJybz(); _getListJssp(); _getListJysp(); _getListStation(); _getListGroup(); } /// /// 读取检验项目 /// private void _getListJyxm() { var json = JsonConvert.SerializeObject("QCITEM"); try { var strReturn = UtilityHelper.HttpPost("", "MesSysLookupTypesManager/GetItemList", json); var dd = UtilityHelper.ReturnToList(strReturn); var dt = dd.rtnData; foreach (DataRow dr in dt.Rows) { rptJYXM.Items.Add(dr["lookUpName"].ToString()); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } /// /// 读取检验工位 /// private void _getListStation() { string _where = " and 1=1 and s_type='工位信息' and pid<>'00000000-0000-0000-0000-000000000000'"; var pgq = new PageQueryModel(1, 999999, "a.defect_name", "asc", "", _where); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = UtilityHelper.HttpPost("", "MesDefectCodeManager/GetListPage", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); var dt = dd.rtnData.list; foreach (DataRow dr in dt.Rows) { //tlMenu.KeyFieldName = "guid"; //tlMenu.ParentFieldName = "pid"; rptStation.Items.Add(dr["defectName"].ToString()); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } /// /// 读取检验工具 /// private void _getListJygj() { var json = JsonConvert.SerializeObject("QATOOLS"); try { var strReturn = UtilityHelper.HttpPost("", "MesSysLookupTypesManager/GetItemList", json); var dd = UtilityHelper.ReturnToList(strReturn); var dt = dd.rtnData; foreach (DataRow dr in dt.Rows) { rptJYGJ.Items.Add(dr["lookUpName"].ToString()); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } /// /// 读取检验标准 /// private void _getListJybz() { var pgq = new PageQueryModel(1, 999999, "CREATE_DATE", "asc", "", " and 1=1"); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = UtilityHelper.HttpPost("", "MesQmAql1Manager/GetListPage", json); var rtn = UtilityHelper.ReturnToTablePage(strReturn); var dt = rtn.rtnData.list; foreach (DataRow dr in dt.Rows) { rptJYBZ.Items.Add((new CboItemEntity(dr["SampleSizeNo"].ToString(), dr["SampleSizeName"].ToString()))); } } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } /// /// 读取接受水平 /// private void _getListJssp() { rptJSSP.Items.AddRange(new string[] { "0.010---(AQL_0_0010)" ,"0.015---(AQL_0_0015)" ,"0.025---(AQL_0_0025)" ,"0.040---(AQL_0_0040)" ,"0.065---(AQL_0_0065)" ,"0.10---(AQL_0_010)" ,"0.15---(AQL_0_015)" ,"0.25---(AQL_0_025)" ,"0.40---(AQL_0_040)" ,"0.65---(AQL_0_065)" ,"1.00---(AQL_0_100)" ,"1.50---(AQL_0_150)" ,"2.00---(AQL_0_200)" ,"2.50---(AQL_0_250)" }); } /// /// 读取检验水平 /// private void _getListJysp() { rptJYSP.Items.AddRange(new string[] { "1.一般检验水平(I)" , "2.一般检验水平(II)" ,"3.一般检验水平(III)" ,"4.特殊检验水平(S1)" ,"5.特殊检验水平(S2)" ,"6.特殊检验水平(S3)" ,"7.特殊检验水平(S4)" }); } /// /// 读取检验水平 /// private void _getListGroup() { rptGroup.Items.AddRange(new string[] { "外观" ,"颜色" ,"尺寸" , "关键部件一致性" , "品水测试" ,"制热性能" ,"进水压力" ,"电气性能" }); } /// /// 关联检验标准名称 /// /// /// private void rptJYBZ_SelectedIndexChanged(object sender, EventArgs e) { ComboBoxEdit comboBox = sender as ComboBoxEdit; if (comboBox != null) { GridView myView = (gcMx1.MainView as GridView); int dataIndex = myView.GetDataSourceRowIndex(myView.FocusedRowHandle); CboItemEntity _itm = comboBox.EditValue as CboItemEntity; string _val = _itm.Value.ToString(); string _txt = _itm.Text.ToString(); gvMx1.CloseEditor(); gvMx1.UpdateCurrentRow(); gvMx1.SetRowCellValue(dataIndex, "sampleSizeNo", _val); gvMx1.SetRowCellValue(dataIndex, "sampleSizeName", _txt); } } /// /// 移出明细 /// /// /// private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { gvMx1.CloseEditor(); gvMx1.UpdateCurrentRow(); var rowhandle = gvMx1.FocusedRowHandle; if (rowhandle < 0) return; if (e.Button.Index == 0) { var dr = gvMx1.GetDataRow(rowhandle); var mxGuid = dr["guid"].ToString(); if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?")) return; if (string.IsNullOrEmpty(mxGuid)) { gvMx1.DeleteRow(rowhandle); return; } var strJson = ""; var lst = new List(); lst.Add(mxGuid); try { strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModelMx", JsonConvert.SerializeObject(lst)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) getModel(lbGuid.Text); MsgHelper.Warning("提示:" + _rtn.rtnMsg); } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } } } #endregion } }