xj qian
2024-06-28 ebb3b956d3c5e2ec8c2308e20d650c91fb08cc01
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
þÿuse "xcontrol.vframe.vbusiness.vd"
use "xbase.vframe.vbusiness.vd"
 
unit trade
[
    class paymenSupplier : public frame
    {
 
        string Paymentmethod = "";
        string currbox;
        int OnOK()
        {
            xaserverarg arg = GetParam();
            if (currbox == "cbx1")
            {
                xedit cbx1_val1 = GetControl("cbx1_val1");
                Paymentmethod = "ÛNÓT" + cbx1_val1.GetText() + "Y)QíSÑyhNØn";
            }
            else if (currbox == "cbx2")
            {
                xedit cbx2_val1 = GetControl("cbx2_val1");
                xedit cbx2_val2 = GetControl("cbx2_val2");
                Paymentmethod = "N§RMh7xn‹¤T˜„NØ" + cbx2_val1.GetText() + "% [š‘Ñÿ OYk>" + cbx2_val2.GetText() + "Y)QíSÑyhNØn";
            }
            else if (currbox == "cbx3")
            {
                xedit cbx3_val1 = GetControl("cbx3_val1");
                xedit cbx3_val2 = GetControl("cbx3_val2");
                xedit cbx3_val3 = GetControl("cbx3_val3");
                Paymentmethod = "N§RMh7xn‹¤T˜„NØ" + cbx3_val1.GetText() + "% [š‘Ñÿ šŒ'Th<T" + cbx3_val2.GetText() + "% k>R0Sэ'ÿ OYk>" + cbx3_val3.GetText() + "Y)QíSÑyhkcg,NØn";
            }
            else if (currbox == "cbx4")
            {
                Paymentmethod = "šŒ'Th<TQíO›e¹kcg,SÑyhbSÑyhOÝQýk>R0Sэ'";
            }
            else if (currbox == "cbx5")
            {
                xedit cbx5_val1 = GetControl("cbx5_val1");
                xedit cbx5_val2 = GetControl("cbx5_val2");
                Paymentmethod = "šŒ'Th<T " + cbx5_val1.GetText() + "% k>R0Sэ'ÿ OYk>" + cbx5_val2.GetText() + "Y)QíSÑyhNØn";
            }
            else
            {
                Paymentmethod = "";
            }
            arg.AddArg("PayType", Paymentmethod);
            CloseWindow();
            return 1;
        }
        int OnCmdDispatch(string comdid)
        {
            if (comdid == "xmClose")
            {
                CloseWindow();
                return 1;
            }
            else if (comdid == "xmOK")
            {
                OnOK();
            }
            return 0;
        }
 
        int OnXCommand(ref TXCommandEvent evt, int p)
        {
            return OnCmdDispatch(evt.pStrID);
        }
 
        int OnCkbCLick(ref TEvent evt, int p)
        {
            int param = evt.lParam;
            xcheckbox cbx_1 = GetControl("cbx1");
            int state1 = cbx_1.GetCheck(cbx_1.GetId());
            xcheckbox cbx_2 = GetControl("cbx2");
            int state2 = cbx_2.GetCheck(cbx_2.GetId());
            xcheckbox cbx_3 = GetControl("cbx3");
            int state3 = cbx_3.GetCheck(cbx_3.GetId());
            xcheckbox cbx_4 = GetControl("cbx4");
            int state4 = cbx_4.GetCheck(cbx_4.GetId());
            xcheckbox cbx_5 = GetControl("cbx5");
            int state5 = cbx_5.GetCheck(cbx_5.GetId());
 
            if (param == cbx_1.GetId())
            {
                cbx_2.SetUnCheck(cbx_2.GetId());
                cbx_3.SetUnCheck(cbx_3.GetId());
                cbx_4.SetUnCheck(cbx_4.GetId());
                cbx_5.SetUnCheck(cbx_5.GetId());
                if (state1 == 1)
                {
                    currbox = "cbx1";
                }
                else
                {
                    currbox = "";
                }
            }
            else if (param == cbx_2.GetId())
            {
                cbx_1.SetUnCheck(cbx_1.GetId());
                cbx_3.SetUnCheck(cbx_3.GetId());
                cbx_4.SetUnCheck(cbx_4.GetId());
                cbx_5.SetUnCheck(cbx_5.GetId());
                if (state2 == 1)
                {
                    currbox = "cbx2";
                }
                else
                {
                    currbox = "";
                }
            }
            else if (param == cbx_3.GetId())
            {
                cbx_1.SetUnCheck(cbx_1.GetId());
                cbx_2.SetUnCheck(cbx_2.GetId());
                cbx_4.SetUnCheck(cbx_4.GetId());
                cbx_5.SetUnCheck(cbx_5.GetId());
                if (state3 == 1)
                {
                    currbox = "cbx3";
                }
                else
                {
                    currbox = "";
                }
            }
            else if (param == cbx_4.GetId())
            {
                cbx_1.SetUnCheck(cbx_1.GetId());
                cbx_2.SetUnCheck(cbx_2.GetId());
                cbx_3.SetUnCheck(cbx_3.GetId());
                cbx_5.SetUnCheck(cbx_5.GetId());
                if (state4 == 1)
                {
                    currbox = "cbx4";
                }
                else
                {
                    currbox = "";
                }
            }
            else if (param == cbx_5.GetId())
            {
                cbx_1.SetUnCheck(cbx_1.GetId());
                cbx_2.SetUnCheck(cbx_2.GetId());
                cbx_3.SetUnCheck(cbx_3.GetId());
                cbx_4.SetUnCheck(cbx_4.GetId());
                if (state5 == 1)
                {
                    currbox = "cbx5";
                }
                else
                {
                    currbox = "";
                }
            }
            return 1;
        }
 
        int OnAttachEvent()
        {
            AttachEvent("WM_XCOMMAND", OnXCommand);
            AttachEvent("WM_COMMAND", OnCkbCLick);
            return 1;
        }
 
        int onload()
        {
            OnAttachEvent();
            return 1;
        }
    };
]