From 22834dc7e0310f03fd16326c6ab41189c21f1543 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 18 十二月 2024 10:53:26 +0800
Subject: [PATCH] 补料
---
DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.Designer.cs | 88 +++++++++++--
DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.cs | 224 ++++++++++++++++++-------------------
2 files changed, 179 insertions(+), 133 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.Designer.cs
index 9539d5e..e45509f 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.Designer.cs
@@ -29,6 +29,11 @@
/// </summary>
private void InitializeComponent()
{
+ DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
this.gvMx1bld020 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gvMx1bld019 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gvMx1bld018 = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -56,6 +61,9 @@
this.tabMxPage1 = new DevExpress.XtraTab.XtraTabPage();
this.gcMx1 = new DevExpress.XtraGrid.GridControl();
this.gvMx1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+ this.dabGuid = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gvMxDel = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
this.gv_wcTime = new DevExpress.XtraGrid.Columns.GridColumn();
this.gv_wcUser = new DevExpress.XtraGrid.Columns.GridColumn();
this.gv_itemId = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -123,6 +131,7 @@
this.tabMxPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_bl016.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_bl015.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_bl014.Properties)).BeginInit();
@@ -261,7 +270,7 @@
this.gvMx1bld012.Name = "gvMx1bld012";
this.gvMx1bld012.Tag = "query_a.bld012";
this.gvMx1bld012.Visible = true;
- this.gvMx1bld012.VisibleIndex = 13;
+ this.gvMx1bld012.VisibleIndex = 2;
this.gvMx1bld012.Width = 94;
//
// repositoryItemSearchLookUpEdit1
@@ -269,9 +278,12 @@
this.repositoryItemSearchLookUpEdit1.AutoHeight = false;
this.repositoryItemSearchLookUpEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+ this.repositoryItemSearchLookUpEdit1.DisplayMember = "itemId";
this.repositoryItemSearchLookUpEdit1.Name = "repositoryItemSearchLookUpEdit1";
+ this.repositoryItemSearchLookUpEdit1.NullText = "璇烽�夋嫨";
this.repositoryItemSearchLookUpEdit1.PopupView = this.repositoryItemSearchLookUpEdit1View;
- this.repositoryItemSearchLookUpEdit1.EditValueChanged += new System.EventHandler(this.repositoryItemSearchLookUpEdit1_EditValueChanged_2);
+ this.repositoryItemSearchLookUpEdit1.ValueMember = "itemId";
+ this.repositoryItemSearchLookUpEdit1.EditValueChanged += new System.EventHandler(this.repositoryItemSearchLookUpEdit1_EditValueChanged);
//
// repositoryItemSearchLookUpEdit1View
//
@@ -290,7 +302,7 @@
this.gvMx1bld011.Name = "gvMx1bld011";
this.gvMx1bld011.Tag = "query_a.bld011";
this.gvMx1bld011.Visible = true;
- this.gvMx1bld011.VisibleIndex = 12;
+ this.gvMx1bld011.VisibleIndex = 13;
this.gvMx1bld011.Width = 94;
//
// gvMx1bld010
@@ -303,7 +315,7 @@
this.gvMx1bld010.Name = "gvMx1bld010";
this.gvMx1bld010.Tag = "query_a.bld010";
this.gvMx1bld010.Visible = true;
- this.gvMx1bld010.VisibleIndex = 11;
+ this.gvMx1bld010.VisibleIndex = 12;
this.gvMx1bld010.Width = 94;
//
// gvMx1bld009
@@ -316,7 +328,7 @@
this.gvMx1bld009.Name = "gvMx1bld009";
this.gvMx1bld009.Tag = "query_a.bld009";
this.gvMx1bld009.Visible = true;
- this.gvMx1bld009.VisibleIndex = 10;
+ this.gvMx1bld009.VisibleIndex = 11;
this.gvMx1bld009.Width = 94;
//
// gvMx1bld008
@@ -329,20 +341,24 @@
this.gvMx1bld008.Name = "gvMx1bld008";
this.gvMx1bld008.Tag = "query_a.bld008";
this.gvMx1bld008.Visible = true;
- this.gvMx1bld008.VisibleIndex = 9;
+ this.gvMx1bld008.VisibleIndex = 10;
this.gvMx1bld008.Width = 94;
//
// gvMx1bld007
//
this.gvMx1bld007.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
+ this.gvMx1bld007.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.gvMx1bld007.AppearanceCell.Options.UseFont = true;
+ this.gvMx1bld007.AppearanceCell.Options.UseForeColor = true;
+ this.gvMx1bld007.AppearanceHeader.ForeColor = System.Drawing.Color.Blue;
+ this.gvMx1bld007.AppearanceHeader.Options.UseForeColor = true;
this.gvMx1bld007.Caption = "鐢宠鏁伴噺 ";
this.gvMx1bld007.FieldName = "bld007";
this.gvMx1bld007.MinWidth = 50;
this.gvMx1bld007.Name = "gvMx1bld007";
this.gvMx1bld007.Tag = "query_a.bld007";
this.gvMx1bld007.Visible = true;
- this.gvMx1bld007.VisibleIndex = 8;
+ this.gvMx1bld007.VisibleIndex = 9;
this.gvMx1bld007.Width = 94;
//
// gvMx1bld006
@@ -355,7 +371,7 @@
this.gvMx1bld006.Name = "gvMx1bld006";
this.gvMx1bld006.Tag = "query_a.bld006";
this.gvMx1bld006.Visible = true;
- this.gvMx1bld006.VisibleIndex = 7;
+ this.gvMx1bld006.VisibleIndex = 8;
this.gvMx1bld006.Width = 94;
//
// gvMx1bld005
@@ -368,7 +384,7 @@
this.gvMx1bld005.Name = "gvMx1bld005";
this.gvMx1bld005.Tag = "query_a.bld005";
this.gvMx1bld005.Visible = true;
- this.gvMx1bld005.VisibleIndex = 6;
+ this.gvMx1bld005.VisibleIndex = 7;
this.gvMx1bld005.Width = 94;
//
// gvMx1bld004
@@ -381,7 +397,7 @@
this.gvMx1bld004.Name = "gvMx1bld004";
this.gvMx1bld004.Tag = "query_a.bld004";
this.gvMx1bld004.Visible = true;
- this.gvMx1bld004.VisibleIndex = 5;
+ this.gvMx1bld004.VisibleIndex = 6;
this.gvMx1bld004.Width = 94;
//
// gvMx1bld003
@@ -394,7 +410,7 @@
this.gvMx1bld003.Name = "gvMx1bld003";
this.gvMx1bld003.Tag = "query_a.bld003";
this.gvMx1bld003.Visible = true;
- this.gvMx1bld003.VisibleIndex = 4;
+ this.gvMx1bld003.VisibleIndex = 5;
this.gvMx1bld003.Width = 94;
//
// gvMx1bld002
@@ -407,7 +423,7 @@
this.gvMx1bld002.Name = "gvMx1bld002";
this.gvMx1bld002.Tag = "query_a.bld002";
this.gvMx1bld002.Visible = true;
- this.gvMx1bld002.VisibleIndex = 3;
+ this.gvMx1bld002.VisibleIndex = 4;
this.gvMx1bld002.Width = 94;
//
// gvMx1bld001
@@ -420,7 +436,7 @@
this.gvMx1bld001.Name = "gvMx1bld001";
this.gvMx1bld001.Tag = "query_a.bld001";
this.gvMx1bld001.Visible = true;
- this.gvMx1bld001.VisibleIndex = 2;
+ this.gvMx1bld001.VisibleIndex = 3;
this.gvMx1bld001.Width = 94;
//
// gvMx1mid
@@ -441,7 +457,7 @@
this.gvMx1id.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
this.gvMx1id.AppearanceCell.Options.UseFont = true;
this.gvMx1id.Caption = "ID ";
- this.gvMx1id.FieldName = "id";
+ this.gvMx1id.FieldName = "guid";
this.gvMx1id.MinWidth = 50;
this.gvMx1id.Name = "gvMx1id";
this.gvMx1id.Tag = "query_a.id";
@@ -463,7 +479,8 @@
this.gcMx1.MainView = this.gvMx1;
this.gcMx1.Name = "gcMx1";
this.gcMx1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
- this.repositoryItemSearchLookUpEdit1});
+ this.repositoryItemSearchLookUpEdit1,
+ this.repositoryItemButtonEdit1});
this.gcMx1.Size = new System.Drawing.Size(1124, 336);
this.gcMx1.TabIndex = 0;
this.gcMx1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -493,13 +510,46 @@
this.gvMx1bld017,
this.gvMx1bld018,
this.gvMx1bld019,
- this.gvMx1bld020});
+ this.gvMx1bld020,
+ this.dabGuid,
+ this.gvMxDel});
this.gvMx1.GridControl = this.gcMx1;
this.gvMx1.Name = "gvMx1";
this.gvMx1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True;
this.gvMx1.OptionsFind.ShowSearchNavButtons = false;
this.gvMx1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
this.gvMx1.OptionsView.ShowGroupPanel = false;
+ //
+ // dabGuid
+ //
+ this.dabGuid.Caption = "gridColumn1";
+ this.dabGuid.FieldName = "dabGuid";
+ this.dabGuid.MinWidth = 25;
+ this.dabGuid.Name = "dabGuid";
+ this.dabGuid.Visible = true;
+ this.dabGuid.VisibleIndex = 22;
+ this.dabGuid.Width = 94;
+ //
+ // gvMxDel
+ //
+ this.gvMxDel.Caption = "绉诲嚭";
+ this.gvMxDel.ColumnEdit = this.repositoryItemButtonEdit1;
+ this.gvMxDel.MinWidth = 25;
+ this.gvMxDel.Name = "gvMxDel";
+ this.gvMxDel.Visible = true;
+ this.gvMxDel.VisibleIndex = 23;
+ this.gvMxDel.Width = 94;
+ //
+ // repositoryItemButtonEdit1
+ //
+ this.repositoryItemButtonEdit1.AutoHeight = false;
+ editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
+ editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
+ this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+ new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+ this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
+ this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
+ this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick);
//
// gv_wcTime
//
@@ -1057,7 +1107,7 @@
this.gv_id.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
this.gv_id.AppearanceCell.Options.UseFont = true;
this.gv_id.Caption = "ID ";
- this.gv_id.FieldName = "id";
+ this.gv_id.FieldName = "guid";
this.gv_id.MinWidth = 50;
this.gv_id.Name = "gv_id";
this.gv_id.OptionsColumn.AllowEdit = false;
@@ -1287,6 +1337,7 @@
this.tabMxPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gcMx1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_bl016.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_bl015.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_bl014.Properties)).EndInit();
@@ -1417,5 +1468,8 @@
private System.Windows.Forms.PictureBox picCheckBox;
private DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit repositoryItemSearchLookUpEdit1;
private DevExpress.XtraGrid.Views.Grid.GridView repositoryItemSearchLookUpEdit1View;
+ private DevExpress.XtraGrid.Columns.GridColumn dabGuid;
+ private DevExpress.XtraGrid.Columns.GridColumn gvMxDel;
+ private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.cs
index ec96d61..770df5d 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemBl.cs
@@ -1,4 +1,4 @@
-using DevExpress.RichEdit.Export;
+using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections;
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
@@ -30,10 +30,10 @@
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
- // Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "bl018", "", (value) =>
- //{
- // Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- //});
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "bl018", "", (value) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -64,7 +64,7 @@
try
{
var strReturn = UtilityHelper.HttpPost("",
- "MesItemsManager/GetListSelect", json);
+ "WomdaaManager/GetListSelectDab", json);
var rtn = UtilityHelper.ReturnToTablePage(strReturn);
var dt = rtn.rtnData.list;
this.repositoryItemSearchLookUpEdit1.DataSource = dt;
@@ -132,33 +132,39 @@
private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_qtck, gridView1, "qtck");
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
return;
- List<dynamic> lst = new List<dynamic>();
- lst.Add(rowGuid);
- var _obj = lst;
+ var _obj = new
+ {
+ guid = rowGuid,
+ mxGuid = Guid.Empty.ToString(),
+ };
try
{
- string strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModel", JsonConvert.SerializeObject(_obj));
- ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ var strJson = UtilityHelper.HttpPost("",
+ _webServiceName + "DeleteModelOrMx",
+ JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (xtraTabControl1.SelectedTabPageIndex == 0)
- getPageList(this.pageBar1.CurrentPage);
- else
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
+ UtilityHelper.JumpToTab(xtraTabControl1, 0);
+ getPageList(1);
}
+
+ MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
+
}
/// <summary>
@@ -190,14 +196,16 @@
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "qtck");
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gvMx1);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
}
/// <summary>
/// 鏂板浜嬩欢
@@ -221,90 +229,74 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
- //toolBarMenu1.isSetBtn = false;
- //string inCusId = txt_qt018.GetId();
- //string inCkId = txt_qt008.GetId();
- //string inLlrId = txt_qt022.GetId();
- //string inDepart = txt_qt009.GetId();
- //string inScgdId = txt_qt006.Text.Trim();
- //if (string.IsNullOrEmpty(inCusId))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨瀹㈡埛锛�");
- // txt_qt018.Focus();
- // return;
- //}
- //if (string.IsNullOrEmpty(inCkId))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
- // txt_qt008.Focus();
- // return;
- //}
- //if (string.IsNullOrEmpty(inLlrId))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨棰嗘枡浜猴紒");
- // txt_qt022.Focus();
- // return;
- //}
- //var _obj = new
- //{
- // guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- // inRklb = txt_qt003.Text.Trim(),//涓氬姟绫诲埆
- // inYwlx = txt_qt004.Text.Trim(),//涓氬姟绫诲瀷
- // inRkfs = txt_qt019.Text.Trim(),//鍏ュ簱鏂瑰紡
- // inRklx = txt_qt020.Text.Trim(),//鍏ュ簱绫诲瀷
- // inCusId = inCusId,//瀹㈡埛
- // inCkId = inCkId,//浠撳簱
- // inDepart = inDepart,//鐢宠閮ㄩ棬
- // inXsdh = txt_qt021.Text.Trim(),//閿�鍞崟鍙�
- // inScgdId = inScgdId,//鐢熶骇宸ュ崟鍙�
- // inLlrId = inLlrId,//棰嗘枡浜�
- // inRkyy = txt_qt010.Text.Trim(),//鍘熷洜
- // list = new List<dynamic>(),
- //};
- //gvMx1.CloseEditor();
- //gvMx1.UpdateCurrentRow();
- //if (gvMx1.DataRowCount <= 0)
- //{
- // MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
- // return;
- //}
- //for (var i = 0; i < gvMx1.DataRowCount; i++)
- //{
- // var row = gvMx1.GetDataRow(i);
- // if (row != null)
- // {
- // Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
- // //string _msl = row["quantity"].ToString();
- // //if (string.IsNullOrEmpty(_msl))
- // //{
- // // MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
- // // return;
- // //}
- // _obj.list.Add(new
- // {
- // Guid = _guid,
- // ItemId = (row["itemId"].ToString()),
- // Sqsl = (row["qd007"].ToString()),
- // Bz = (row["qd010"].ToString()),
- // });
- // }
- //}
- //try
- //{
- // string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
- // ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- // ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
- // if (_rtn.rtnCode > 0)
- // {
- // lbGuid.Text = _rtn.rtnData;
- // toolBarMenu1.isSetBtn = true;
- // UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
- // }
- //}
- //catch (Exception ex)
- //{
- // ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- //}
+ toolBarMenu1.isSetBtn = false;
+ string inGdId = txt_bl001.GetId();//宸ュ崟鍙�
+ string inCkId = txt_bl010.GetId();//鍙戞枡浠�
+ if (string.IsNullOrEmpty(inGdId))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+ txt_bl001.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(inCkId))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
+ txt_bl010.Focus();
+ return;
+ }
+ var _obj = new
+ {
+ guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
+ inGdId = inGdId,//宸ュ崟鍙�
+ inCkId = inCkId,//浠撳簱
+ inYy = txt_bl007.Text.Trim(),//鍘熷洜
+ list = new List<dynamic>(),
+ };
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
+ if (gvMx1.DataRowCount <= 0)
+ {
+ MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鐢宠鏄庣粏锛�");
+ return;
+ }
+ for (var i = 0; i < gvMx1.DataRowCount; i++)
+ {
+ var row = gvMx1.GetDataRow(i);
+ if (row != null)
+ {
+ Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
+ //string _msl = row["quantity"].ToString();
+ //if (string.IsNullOrEmpty(_msl))
+ //{
+ // MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
+ // return;
+ //}
+ _obj.list.Add(new
+ {
+ Guid = _guid,
+ DabGuid= (row["dabGuid"].ToString()),
+ ItemId = (row["bld012"].ToString()),
+ Sqsl = (row["bld007"].ToString()),
+ Bz = (row["bld010"].ToString()),
+ });
+ }
+ }
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ if (_rtn.rtnCode > 0)
+ {
+ lbGuid.Text = _rtn.rtnData;
+ toolBarMenu1.isSetBtn = true;
+ UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
+ }
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
}
/// <summary>
@@ -441,7 +433,7 @@
};
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "qtck");
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -449,7 +441,6 @@
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
return;
-
var _obj = new
{
guid = rowGuid,
@@ -477,6 +468,16 @@
}
+ private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e)
+ {
+ SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
+ DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
+ gvMx1.SetFocusedRowCellValue("bld002", SelectedDataRow["itemNo"]);
+ gvMx1.SetFocusedRowCellValue("bld003", SelectedDataRow["itemName"]);
+ gvMx1.SetFocusedRowCellValue("bld004", SelectedDataRow["itemModel"]);
+ gvMx1.SetFocusedRowCellValue("dabGuid", SelectedDataRow["dabGuid"]);
+ }
+
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
var rowhandle = gvMx1.FocusedRowHandle;
@@ -485,7 +486,7 @@
if (e.Button.Index == 0)
{
var dr = gvMx1.GetDataRow(rowhandle);
- var mxGuid = dr["guid"].ToString();
+ var mxGuid = dr["id"].ToString();
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
return;
if (string.IsNullOrEmpty(mxGuid))
@@ -515,15 +516,6 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
- }
-
- private void repositoryItemSearchLookUpEdit1_EditValueChanged_2(object sender, EventArgs e)
- {
- SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
- DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
- gvMx1.SetFocusedRowCellValue("bld002", SelectedDataRow["itemNo"]);
- gvMx1.SetFocusedRowCellValue("bld003", SelectedDataRow["itemName"]);
- gvMx1.SetFocusedRowCellValue("bld004", SelectedDataRow["itemModel"]);
}
}
}
\ No newline at end of file
--
Gitblit v1.9.3