schangxiang@126.com
2025-09-19 9be9c3784b2881a3fa25e93ae2033dc2803c0ed0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using wcftest.BussinessExtension.Handle;
using wcftest.orm;
using wcftest.sendToSap;
 
namespace WMS_TestForm
{
    public partial class TestForm : Form
    {
        public TestForm()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            string _retResult = "aaa";
            string _retMsg = "bbb";
            GRMaterialEntity[] results = new GRMaterialEntity[1];
            GRMaterialEntity zz = new GRMaterialEntity()
            {
                MaterialCode = "A7EQD-5141154321",
                PoNumber = "11",
                PoItem = "233232",
                StorageLocation = "23232"
            };
            results[0] = zz;
            SapSendFailRecodInfoHandler.AddForSH(results, _retResult, _retMsg);//记录失败表
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            int continerType = this.comboBox_DiePanJi.SelectedIndex + 1;
 
            using (dbModel mod = new dbModel())
            {
                Base_Equipment fpMachine = null;
                var isFull = Base_EquipmentHandler.FoldingPlateMachine_IsFull(mod, continerType, ref fpMachine);
                this.tb_log.Text = "已满:" + isFull + ",对象:" + JsonConvert.SerializeObject(fpMachine);
            }
        }
 
        private void button3_Click(object sender, EventArgs e)
        {
            int continerType = this.comboBox_DiePanJi.SelectedIndex + 1;
 
            using (dbModel mod = new dbModel())
            {
                Base_EquipmentHandler.FoldingPlateMachine_UpdateCurQuantityZero(mod, continerType);
                mod.SaveChanges();
                button2_Click(null, null);
            }
        }
 
        private void button4_Click(object sender, EventArgs e)
        {
            int continerType = this.comboBox_DiePanJi.SelectedIndex + 1;
 
            using (dbModel mod = new dbModel())
            {
                Base_Equipment fpMachine = null;
                var isFull = Base_EquipmentHandler.FoldingPlateMachine_IsFull(mod, continerType, ref fpMachine);
                Base_EquipmentHandler.FoldingPlateMachine_UpdateCurQuantityAddOne(mod, fpMachine);
                mod.SaveChanges();
                button2_Click(null, null);
            }
        }
    }
}