From 719894be883cd18a0ce3334e6d9f32ebf6b9a002 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 23 十二月 2024 18:35:16 +0800
Subject: [PATCH] 委外排产

---
 DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs          |   37 ++++++++++++++++++++++++++++++++++++-
 DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.Designer.cs |   21 ++++++++++-----------
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs       |    2 --
 3 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.Designer.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.Designer.cs
index cc5e1ff..3264482 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.Designer.cs
@@ -29,11 +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();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frm_WwPc));
             this.gvMx1rwdGuid = new DevExpress.XtraGrid.Columns.GridColumn();
             this.gvMx1pcGuid = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -372,9 +372,8 @@
             this.gvMxDel});
             this.gvMx1.GridControl = this.gcMx1;
             this.gvMx1.Name = "gvMx1";
-            this.gvMx1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True;
+            this.gvMx1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False;
             this.gvMx1.OptionsFind.ShowSearchNavButtons = false;
-            this.gvMx1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
             this.gvMx1.OptionsView.ShowGroupPanel = false;
             // 
             // gvMxRemark
@@ -404,10 +403,10 @@
             // repositoryItemButtonEdit1
             // 
             this.repositoryItemButtonEdit1.AutoHeight = false;
-            editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
-            editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
+            editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
+            editorButtonImageOptions1.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)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", 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);
@@ -599,7 +598,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;
diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs
index fd2e933..3ab31da 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs
@@ -474,7 +474,42 @@
 
         private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
         {
-
+            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 _obj = new
+                {
+                    guid = lbGuid.Text.Trim(),
+                    mxGuid = mxGuid,
+                };
+                try
+                {
+                    var strJson = UtilityHelper.HttpPost("",
+                        _webServiceName + "DeleteModelOrMx",
+                        JsonConvert.SerializeObject(_obj));
+                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                    if (_rtn.rtnCode > 0)
+                    {
+                        if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+                    }
+                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                }
+                catch (Exception ex)
+                {
+                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                }
+            }
         }
     }
 }
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 6cb3967..2953a88 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1682,8 +1682,6 @@
             return regex.IsMatch(str);
         }
 
-
-
     }
 
     /// <summary>

--
Gitblit v1.9.3