schangxiang@126.com
2025-09-01 4b51c3551c3957ddd5236a18dd480637835cf7d6
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using Sunny.UI;
using sunui.forms;
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 WMS.Untils;
 
namespace WMS.UI.Basic
{
    public partial class BasicDataConfig : Form
    {
        AutoSizeFormClass asc = new AutoSizeFormClass();
        public BasicDataConfig()
        {
            InitializeComponent();
            asc.controllInitializeSize(this);
 
        }
 
        private void BasicDataConfig_Load(object sender, EventArgs e)
        {
            var data_Supplier = "";
            int data_stayMonth = 0;
            using (var client = new yunneiWCS.IyunneiWcfClient())
            {
                data_Supplier = client.GetBasicDataSetForSupplier();
                data_stayMonth = Convert.ToInt32(client.GetBasicDataSetForStayMonths());
            }
            this.textBox_Supplier.Text = data_Supplier;
            this.tb_StayMonths.Text = data_stayMonth.ToString();
        }
 
 
        private void BasicDataConfig_SizeChanged(object sender, EventArgs e)
        {
            asc.controlAutoSize(this);
        }
 
        private void button_confirm_Click_1(object sender, EventArgs e)
        {
            try
            {
                DialogResult dr = MessageBox.Show("确定要修改吗", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                if (dr == DialogResult.OK)
                {
                    var data_StayMonths = this.tb_StayMonths.Text.Trim();
                    int stayMonth = 0;
                    if (!int.TryParse(data_StayMonths, out stayMonth))
                    {
                        WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, "呆滞库位时长必须是数字");
                        ms.Show();
                        return;
                    }
                    var data_Supplier = this.textBox_Supplier.Text.Trim();
                    using (var client = new yunneiWCS.IyunneiWcfClient())
                    {
                        var result = client.UpdateBasicDataSetForSupplier(data_Supplier, FLogin.user.UserName);
                        if (result.result)
                        {
 
                        }
                        else
                        {
                            WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, result.resMsg);
                            ms.Show();
                            return;
                        }
 
                        result = client.UpdateBasicDataSetForStayMonths(stayMonth, FLogin.user.UserName);
                        if (result.result)
                        {
 
                        }
                        else
                        {
                            WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, result.resMsg);
                            ms.Show();
                            return;
                        }
 
                        //成功
                        WMS.EnumDefine.messages ms2 = new WMS.EnumDefine.messages(1, "修改成功");
                        ms2.Show();
                    }
                }
            }
            catch (Exception)
            {
 
            }
        }
 
        private void panel2_Paint(object sender, PaintEventArgs e)
        {
 
        }
 
 
 
        // ShowWarningTip("轻便消息提示框 - 警告");
        // ShowSuccessTip("轻便消息提示框 - 成功");
    }
}