wtt
13 小时以前 6daa91098fe4a1a9109f460ace857b9c341de4a9
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace DAL
{
    public partial class frm_S_BillQueryCondition_New1 : Pub_Control.frm_S_BillQueryCondition_Base
    {
        public frm_S_BillQueryCondition_New1()
        {
            InitializeComponent();
        }
 
        
 
        //°ïÖúº¯Êý
        public override void Sub_GridKeyView(int sKeyCode, int sRow, int sCol, DataGridView grdCondition, DataGridViewTextBoxEditingControl oEdit)
        {
            DAL.ClsK3_Department_View oDept = new DAL.ClsK3_Department_View();
            DAL.ClsK3_Customer_View oCus = new DAL.ClsK3_Customer_View();
            DAL.ClsK3_Currency_View oCur = new DAL.ClsK3_Currency_View();
            DAL.ClsK3_Employee_View oEmp = new DAL.ClsK3_Employee_View();
            DAL.ClsK3_Material_View oMat = new DAL.ClsK3_Material_View();
            DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
            DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View();
            DAL.ClsGy_Process_View oProc = new DAL.ClsGy_Process_View();
            DAL.ClsK3_Supplier_View oSup = new DAL.ClsK3_Supplier_View();
            DAL.ClsK3_Warehouse_View oWare = new DAL.ClsK3_Warehouse_View();
            int FieldNameCol = 2;
            int ConditionCol = 4;
            if (sCol != ConditionCol)
                return;
            switch (sKeyCode)
            {
                case 118:
                    {
                        switch (grdCondition.Rows[sRow].Cells[FieldNameCol].Value.ToString())
                        {
 
                            case "²Ö¿â´úÂë":
                            case "ÊÕÁϲֿâ´úÂë":
                            case "·¢Áϲֿâ´úÂë":
                            case "·¢»õ²Ö¿â´úÂë":
                            case "µ÷Èë²Ö¿â´úÂë":
                            case "µ÷³ö²Ö¿â´úÂë":
                                if (oWare.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oWare.oModel.HNumber.Trim();
                                }
                                break;
                            case "²Ö¿â":
                            case "ÊÕÁϲֿâ":
                            case "·¢Áϲֿâ":
                            case "·¢»õ²Ö¿â":
                            case "µ÷Èë²Ö¿â":
                            case "µ÷³ö²Ö¿â":
                                if (oWare.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oWare.oModel.HName.Trim();
                                }
                                break;
                            case "²¿ÃÅ":
                            case "²¿ÃÅÃû³Æ":
                            case "Éú²ú³µ¼äÃû³Æ":
                                if (oDept.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oDept.oModel.HName.Trim();
 
                                }
                                break;
                            case "²¿ÃÅ´úÂë":
                            case "Éú²ú³µ¼ä´úÂë":
                                if (oDept.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oDept.oModel.HNumber.Trim();
                                }
                                break;
                            case "¹¤Ðò":
                            case "¹¤ÐòÃû³Æ":
                                if (oProc.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oProc.oModel.HName.Trim();
                                }
                                break;
                            case "¹¤Ðò´úÂë":
                                if (oProc.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oProc.oModel.HNumber.Trim();
                                }
                                break;
                            case "°à×é":
                            case "°à×éÃû³Æ":
                                if (oGroup.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oGroup.oModel.HName.Trim();
                                }
                                break;
                            case "°à×é´úÂë":
                                if (oGroup.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oGroup.oModel.HNumber.Trim();
                                }
                                break;
 
                            case "¹©Ó¦ÉÌ":
                            case "¹©Ó¦ÉÌÃû³Æ":
                                if (oSup.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oSup.oModel.HName.Trim();
                                }
                                break;
                            case "¹©Ó¦ÉÌ´úÂë":
                                if (oSup.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oSup.oModel.HNumber.Trim();
                                }
                                break;
                            case "¿Í»§":
                            case "¿Í»§Ãû³Æ":
                                if (oCus.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCus.oModel.HName.Trim();
                                }
                                break;
                            case "¿Í»§´úÂë":
                                if (oCus.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCus.oModel.HNumber.Trim();
                                }
                                break;
                            case "±Ò±ð":
                            case "±Ò±ðÃû³Æ":
                            case "»õ±Ò":
                                if (oCur.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCur.oModel.HName.Trim();
                                }
                                break;
                            case "±Ò±ð´úÂë":
                            case "»õ±Ò´úÂë":
                                if (oCur.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCur.oModel.HNumber.Trim();
                                }
                                break;
                            case "ÒµÎñÔ±":
                            case "ÒµÎñÔ±Ãû³Æ":
                            case "Ö°Ô±":
                            case "Ö°Ô±Ãû³Æ":
                            case "Ö÷¹Ü":
                            case "¸ºÔðÈË":
                            case "±£¹ÜÔ±":
                            case "ÑéÊÕÔ±":
                            case "ÁìÁÏÔ±":
                            case "¾­°ìÈË":
                            case "²Ù×÷Ô±Ãû³Æ":
                            case "Ö÷¹ÜÃû³Æ":
                                if (oEmp.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oEmp.oModel.HName.Trim();
                                }
                                break;
                            case "ÒµÎñÔ±´úÂë":
                            case "Ö÷¹Ü´úÂë":
                            case "¸ºÔðÈË´úÂë":
                            case "±£¹ÜÔ±´úÂë":
                            case "ÑéÊÕÔ±´úÂë":
                            case "ÁìÁÏÔ±´úÂë":
                            case "¾­°ìÈË´úÂë":
                            case "²Ù×÷Ô±´úÂë":
                            case "Ö°Ô±´úÂë":
                                if (oEmp.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oEmp.oModel.HNumber.Trim();
                                }
                                break;
                            case "ÎïÁÏÃû³Æ":
                            case "Ö÷¼þÎïÁÏÃû³Æ":
                                if (oMat.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oMat.omodel.HName.Trim();
                                }
                                break;
                            case "ÎïÁÏ´úÂë":
                            case "Ö÷¼þÎïÁÏ´úÂë":
                                if (oMat.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oMat.omodel.HNumber.Trim();
                                }
                                break;
                            case "¼ÆÁ¿µ¥Î»":
                            case "¼ÆÁ¿µ¥Î»Ãû³Æ":
                            case "Ö÷¼þ¼ÆÁ¿µ¥Î»Ãû³Æ":
                                if (oUnit.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oUnit.oModel.HName.Trim();
                                }
                                break;
                            case "¼ÆÁ¿µ¥Î»´úÂë":
                            case "Ö÷¼þ¼ÆÁ¿µ¥Î»´úÂë":
                                if (oUnit.RefreshView())
                                {
                                    grdCondition.Rows[sRow].Cells[ConditionCol].Value = oUnit.oModel.HNumber.Trim();
                                }
                                break;
                            default:
                                break;
                        }
                        oEdit.Text = DBUtility.ClsPub.isStrNull(grdCondition.Rows[sRow].Cells[ConditionCol].Value);
                        break;
                    }
                case 117:
                    MessageBox.Show("´Ë¹¦ÄÜÉÐ먦·Å£¡", "Ìáʾ");
                    break;
                default:
                    break;
            }
        }
    }
}