· 8 years ago · Jan 11, 2018, 09:32 PM
1// **************************************************
2// Custom code for SalesOrderForm
3// Created: 2015-07-24 4:48:06 PM
4// **************************************************
5
6extern alias Erp_Contracts_BO_AlternatePart;
7extern alias Erp_Contracts_BO_SalesOrder;
8extern alias Erp_Contracts_BO_Quote;
9extern alias Erp_Contracts_BO_Part;
10extern alias Erp_Contracts_BO_Customer;
11extern alias Erp_Contracts_BO_RMAProc;
12extern alias Erp_Contracts_BO_OrderDtlSearch;
13extern alias Erp_Contracts_BO_OrderHist;
14extern alias Erp_Contracts_BO_QuoteDtlSearch;
15extern alias Erp_Contracts_BO_SerialNumberSearch;
16extern alias Erp_Contracts_BO_ShipTo;
17
18using System;
19using System.ComponentModel;
20using System.Data;
21using System.Diagnostics;
22using System.Windows.Forms;
23using Erp.UI;
24using Ice.Lib.Customization;
25using Ice.Lib.ExtendedProps;
26using Ice.Lib.Framework;
27using Ice.Lib.Searches;
28using Ice.UI.FormFunctions;
29using System.Threading;
30using System.Collections.Generic;
31
32public class Script
33{
34
35 private Ice.Lib.Customization.CustomScriptManager csm;
36
37 private Erp.UI.App.SalesOrderEntry.Transaction oTrans;
38
39 private Erp.UI.App.SalesOrderEntry.SalesOrderForm SalesOrderForm;
40
41 private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager baseToolbarsManager;
42
43 private System.Data.DataTable OrderRel_Column;
44
45 private Ice.Lib.Framework.EpiDataView OrderRelTree_Row;
46
47 private System.Data.DataTable OrderMsc_Column;
48
49 private Ice.Lib.Framework.EpiDataView OrderMsc_Row;
50
51 private System.Data.DataTable QuoteDtlAttch_Column;
52
53 private Ice.Lib.Framework.EpiDataView AutoAttachQuoteDtl_Row;
54
55 private System.Data.DataTable QuoteHedList_Column;
56
57 private Ice.Lib.Framework.EpiDataView QuoteHedList_Row;
58
59 private System.Data.DataTable OrderHed_Column;
60
61 private Ice.Lib.Framework.EpiDataView OrderHed_Row;
62
63 private System.Data.DataTable BookDtl_Column;
64
65 private Ice.Lib.Framework.EpiDataView BookDtl_Row;
66
67 private System.Data.DataTable SerialNumberSearch_Column;
68
69 private Ice.Lib.Framework.EpiDataView SNS_Row;
70
71 private System.Data.DataTable SaveOTSParams_Column;
72
73 private Ice.Lib.Framework.EpiDataView SaveOTS_Row;
74
75 private System.Data.DataTable OrderHedList_Column;
76
77 private Ice.Lib.Framework.EpiDataView OrderHedList_Row;
78
79 private System.Data.DataTable BpmData_Column;
80
81 private Ice.Lib.Framework.EpiDataView CallContextBpmData_Row;
82
83 private System.Data.DataTable ccTable_Column;
84
85 private Ice.Lib.Framework.EpiDataView CreditTran2_Row;
86
87 private System.Data.DataTable SalesKitPartInfo_Column;
88
89 private Ice.Lib.Framework.EpiDataView KitPartInfo_Row;
90
91 private Ice.Lib.Framework.EpiDataView OrderRel_Row;
92
93 private System.Data.DataTable OrderDtlAttch_Column;
94
95 private Ice.Lib.Framework.EpiDataView AutoAttachOrderDtl_Row;
96
97 private Ice.Lib.Framework.EpiDataView AutoAttachSalesKits_Row;
98
99 private System.Data.DataTable QuoteDtl_Column;
100
101 private Ice.Lib.Framework.EpiDataView QuoteDtl_Row;
102
103 private System.Data.DataTable TaxConnectStatus_Column;
104
105 private Ice.Lib.Framework.EpiDataView TaxConnectStatus_Row;
106
107 private System.Data.DataTable OrderRelTax_Column;
108
109 private Ice.Lib.Framework.EpiDataView OrdRelTax_Row;
110
111 private System.Data.DataTable _Column;
112
113 private Ice.Lib.Framework.EpiDataView NoBoundField_Row;
114
115 private System.Data.DataTable OrderDtl_Column;
116
117 private Ice.Lib.Framework.EpiDataView SalesKits_Row;
118
119 private System.Data.DataTable OHOrderMsc_Column;
120
121 private Ice.Lib.Framework.EpiDataView OHOrderMsc_Row;
122
123 private System.Data.DataTable Client_Column;
124
125 private Ice.Lib.Framework.EpiDataView CallContextClientData_Row;
126
127 private Ice.Lib.Framework.EpiDataView OrderDtlTree_Row;
128
129 private System.Data.DataTable OrderHedUPS_Column;
130
131 private Ice.Lib.Framework.EpiDataView OrderHedUPS_Row;
132
133 private Ice.Lib.Framework.EpiDataView OrderDtl_Row;
134
135 private System.Data.DataTable OrderRepComm_Column;
136
137 private Ice.Lib.Framework.EpiDataView OrderRepComm_Row;
138
139 private System.Data.DataTable CreditTran_Column;
140
141 private Ice.Lib.Framework.EpiDataView CreditTran_Row;
142
143 private Ice.Lib.Framework.EpiDataView CopyNew_Row;
144
145 private System.Data.DataTable HedTaxSum_Column;
146
147 private Ice.Lib.Framework.EpiDataView HedTaxSum_Row;
148
149 private System.Data.DataTable JobProd_Column;
150
151 private Ice.Lib.Framework.EpiDataView JobProd_Row;
152
153 private System.Data.DataTable OrderSched_Column;
154
155 private Ice.Lib.Framework.EpiDataView OrderSched_Row;
156
157 private System.Data.DataTable QuoteQty_Column;
158
159 private Ice.Lib.Framework.EpiDataView QuoteQty_Row;
160
161 private System.Data.DataTable PartSubs_Column;
162
163 private Ice.Lib.Framework.EpiDataView AlternatePart_Row;
164
165 private Ice.Lib.Framework.EpiDataView AutoAttachOrderDtlTree_Row;
166
167 private System.Data.DataTable OrderHedAttch_Column;
168
169 private Ice.Lib.Framework.EpiDataView AutoAttachOrderHed_Row;
170
171 private System.Data.DataTable QuoteHedAttch_Column;
172
173 private Ice.Lib.Framework.EpiDataView AutoAttachQuoteHed_Row;
174
175 private System.Data.DataTable QuoteHed_Column;
176
177 private Ice.Lib.Framework.EpiDataView QuoteHed_Row;
178
179 private Ice.Lib.Framework.EpiLabel epiLabelC1;
180
181 private Ice.Lib.Framework.EpiLabel epiLabelC1_e3a135f9_5a5d_4acc_bdfa_903304760694;
182
183 private Ice.Lib.Framework.EpiLabel epiLabelC2;
184
185 private Ice.Lib.Framework.EpiLabel epiLabelC2_0ea5aad9_e947_423b_8fdc_9354006db4ff;
186
187 private Ice.Lib.Framework.EpiLabel epiLabel1;
188
189 private Ice.Lib.Framework.EpiLabel epiLabel1_cff20c3e_2165_403f_9df6_10ecb182ecf3;
190
191 private Ice.Lib.Framework.EpiTextBox epiTextBoxC1;
192
193 private Ice.Lib.Framework.EpiTextBox epiTextBoxC1_d7452973_f266_4fb1_9f50_86176582bf24;
194
195 private Ice.Lib.Framework.EpiTextBox epiTextBoxC2;
196
197 private Ice.Lib.Framework.EpiTextBox epiTextBoxC2_176cff2f_225a_4610_94ef_000a2864cda0;
198
199 private Ice.Lib.Framework.EpiTextBox epiTextBoxC3;
200
201 private Ice.Lib.Framework.EpiTextBox epiTextBoxC3_99151df7_883c_4c1c_b485_d883b5081423;
202
203 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC1;
204
205 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC1_861c7222_896e_4323_89fa_dd2fc20e089d;
206
207 private Ice.Lib.Framework.EpiUltraCombo empBasicComboC1;
208
209 private Ice.Lib.Framework.EpiUltraCombo empBasicComboC1_ac1ee53e_0b23_47f6_9769_6095c17c2044;
210
211 private Ice.Lib.Framework.EpiLabel epiLabelC3;
212
213 private Ice.Lib.Framework.EpiLabel epiLabelC3_99a98a01_c3ac_4fb5_8cea_fadec62a48d3;
214
215 private Ice.Lib.Framework.EpiButton btnSelectContact;
216
217 private Ice.Lib.Framework.EpiButton btnSelectContact_083f1035_9ee3_4f28_a49b_e649a4b1ef07;
218
219 private Ice.Lib.Framework.EpiNumericEditor epiNumericEditorC1;
220
221 private Ice.Lib.Framework.EpiNumericEditor epiNumericEditorC1_ca7ed2c7_7441_4b16_993a_3e759df6558f;
222
223 private Ice.Lib.Framework.EpiUltraCombo cmvPerConName;
224
225 private Ice.Lib.Framework.EpiUltraCombo cmvPerConName_75b07942_9780_420a_9470_9f5d3b854bc1;
226
227 private Ice.Lib.Framework.EpiLabel epiLabelC4;
228
229 private Ice.Lib.Framework.EpiLabel epiLabelC4_0ba376e5_5be4_4241_9e59_ff6a202943c8;
230
231 private Ice.Lib.Framework.EpiUltraCombo cmbContactDOB;
232
233 private Ice.Lib.Framework.EpiUltraCombo cmbContactDOB_15183d62_19c7_4a21_89fc_041569bddd1d;
234
235 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC2;
236
237 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC2_d46d8466_975c_47d9_afd6_a3d209400a9c;
238
239 private Ice.Lib.Framework.EpiLabel epiLabelC5;
240
241 private Ice.Lib.Framework.EpiLabel epiLabelC5_865e5065_22b0_400c_b0a4_aac02471dba6;
242
243 private Ice.Lib.Framework.EpiTextBox txtFirstName;
244
245 private Ice.Lib.Framework.EpiTextBox txtFirstName_2be92edc_ff56_4b31_a15a_46e25fe59ed4;
246
247 private Ice.Lib.Framework.EpiLabel epiLabelC6;
248
249 private Ice.Lib.Framework.EpiLabel epiLabelC6_c8d16e2d_2cac_4ac8_899c_b51966821ec2;
250
251 private Ice.Lib.Framework.EpiLabel epiLabelC7;
252
253 private Ice.Lib.Framework.EpiLabel epiLabelC7_04b8564e_4197_41c2_906d_011c9b81350e;
254
255 private Ice.Lib.Framework.EpiDateTimeEditor epiDateTimeEditorC1;
256
257 private Ice.Lib.Framework.EpiDateTimeEditor epiDateTimeEditorC1_d2a94790_bb2c_42df_a5a1_8e7a967e5e89;
258
259 private Ice.Lib.Framework.EpiButton btnCreateNewContact;
260
261 private Ice.Lib.Framework.EpiButton btnCreateNewContact_78a10f50_af7a_44ef_9078_bc8a81137437;
262
263 private Ice.Lib.Framework.EpiTextBox epiTextBoxC4;
264
265 private Ice.Lib.Framework.EpiTextBox epiTextBoxC4_f14878e2_0e8d_403d_bd68_c354cfad6c54;
266
267 private Ice.Lib.Framework.EpiLabel epiLabelC8;
268
269 private Ice.Lib.Framework.EpiLabel epiLabelC8_b3ffbad4_d2a9_4122_b9a7_a6836107d70b;
270
271 private Ice.Lib.Framework.EpiUltraCombo cmbEmployeeNum;
272
273 private Ice.Lib.Framework.EpiUltraCombo cmbEmployeeNum_5dda1115_e352_4546_92de_bad715e5ea32;
274
275 private Ice.Lib.Framework.EpiLabel epiLabelC1aa;
276
277 private Ice.Lib.Framework.EpiLabel epiLabelC1aa_93eb9282_d276_46dc_919c_83178d357010;
278
279 private Ice.Lib.Framework.EpiTextBox txtEmpNum;
280
281 private Ice.Lib.Framework.EpiTextBox txtEmpNum_2332ab42_e00b_4339_960b_da0a8d8c6bec;
282
283 private Ice.Lib.Framework.EpiDockManagerPanel Sheet1;
284
285 private Ice.Lib.Framework.EpiDockManagerPanel Sheet1_adbc0ab4_b441_46d9_ae92_b32960a53d07;
286
287 private Ice.Lib.Framework.EpiDockManagerPanel Sheet2;
288
289 private Ice.Lib.Framework.EpiDockManagerPanel Sheet2_7f5c5a31_d34c_412b_993d_8866b44f278b;
290
291 private Ice.Lib.Framework.EpiDockManagerPanel Sheet3;
292
293 private Ice.Lib.Framework.EpiDockManagerPanel Sheet3_eaab0101_2d15_4678_921f_525edb65bf89;
294
295 private Ice.Lib.Framework.EpiUltraGrid grdDtlList;
296
297 private Ice.Lib.Framework.EpiUltraGrid grdDtlList_71fd4fbb_38d8_4207_9712_0d8022341a17;
298
299 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC3;
300
301 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC3_cc88c880_a173_4547_bcc4_dc99c2a5aa86;
302
303 private Ice.Lib.Framework.EpiLabel epiLabelC9;
304
305 private Ice.Lib.Framework.EpiLabel epiLabelC9_2b32ec55_7087_4c0d_98a5_6dc5e01697f5;
306
307 private Ice.Lib.Framework.EpiLabel epiLabelC10;
308
309 private Ice.Lib.Framework.EpiLabel epiLabelC10_edfe3fa7_3d56_4630_a12e_5106ae6b95cf;
310
311 private Ice.Lib.Framework.EpiUltraCombo cmbSearchType;
312
313 private Ice.Lib.Framework.EpiUltraCombo cmbSearchType_d8a0cba0_fd0f_4655_b18e_6bc972dbe676;
314
315 private Ice.Lib.Framework.EpiLabel epiLabelC11;
316
317 private Ice.Lib.Framework.EpiLabel epiLabelC11_47617eef_27d0_44e7_bd5d_db99aaf795ce;
318
319 private Ice.Lib.Framework.EpiTextBox epiTextBoxC5;
320
321 private Ice.Lib.Framework.EpiTextBox epiTextBoxC5_7fe56970_1ebf_4709_bb41_4ce0005dd485;
322
323 private Ice.Lib.Framework.EpiLabel epiLabelC12;
324
325 private Ice.Lib.Framework.EpiLabel epiLabelC12_a4c9459a_23f7_400a_80ac_d1ea51010626;
326
327 private Ice.Lib.Framework.EpiTextBox epiTextBoxC6;
328
329 private Ice.Lib.Framework.EpiTextBox epiTextBoxC6_96805b1c_337a_4eb5_b5cc_c08569d9ff7a;
330
331 private Ice.Lib.Framework.EpiLabel epiLabelC1comp;
332
333 private Ice.Lib.Framework.EpiLabel epiLabelC1comp_c32e2c43_2eda_4200_a86a_b7a364ae5070;
334
335 private Ice.Lib.Framework.EpiTextBox txtCorpName;
336
337 private Ice.Lib.Framework.EpiTextBox txtCorpName_70602aa3_216f_4b49_bc86_f28916a00838;
338
339 private Ice.Lib.Framework.EpiLabel epiLabelC13co;
340
341 private Ice.Lib.Framework.EpiLabel epiLabelC13co_a4790422_9982_4dc1_b067_ce54e766c1ca;
342
343 private Ice.Lib.Framework.EpiTextBox epiTextBoxC7co;
344
345 private Ice.Lib.Framework.EpiTextBox epiTextBoxC7co_b83d2486_c5a9_43c8_803b_8888683e7ee8;
346
347 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC4;
348
349 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC4_7f0f2080_5d48_4965_b198_b5abd21808ad;
350
351 private Ice.Lib.Framework.EpiTextBox txtCustomerComments;
352
353 private Ice.Lib.Framework.EpiTextBox txtCustomerComments_6f8f35a4_951a_4321_b607_409fdf473674;
354
355 private Ice.Lib.Framework.BAQCombo baqComboC1;
356
357 private Ice.Lib.Framework.BAQCombo baqComboC1_dbb6f21e_c202_4481_aecf_ec708f1c5cfc;
358
359 private Ice.Lib.Framework.EpiButton btnRefreshContact;
360
361 private Ice.Lib.Framework.EpiButton btnRefreshContact_e04e7880_2ecf_4f63_8982_39f691360c87;
362
363 private Ice.Lib.Framework.EpiTextBox txtCustomerPONum;
364
365 private Ice.Lib.Framework.EpiTextBox txtCustomerPONum_687a17ed_1050_44f3_9aac_ae9c910aab0c;
366
367 private Ice.Lib.Framework.EpiLabel lblCustomerPONum;
368
369 private Ice.Lib.Framework.EpiLabel lblCustomerPONum_cfb06a0e_5891_4251_b9e6_6d73c38575bc;
370
371 private Ice.Lib.Framework.EpiTextBox txtQuery;
372
373 private Ice.Lib.Framework.EpiTextBox txtQuery_ff235923_b42a_41db_8183_05600a8a5e79;
374
375 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC5;
376
377 private Ice.Lib.Framework.EpiGroupBox epiGroupBoxC5_9b0aa4db_799b_4a8a_af54_f294666dfd04;
378
379 private Ice.Lib.Framework.EpiLabel epiLabelC14;
380
381 private Ice.Lib.Framework.EpiLabel epiLabelC14_cd4d20fa_be1f_426e_958d_425ac53e7084;
382
383 private Ice.Lib.Framework.EpiUltraCombo cmbHeaderPriceList;
384
385 private Ice.Lib.Framework.EpiUltraCombo cmbHeaderPriceList_0efb8c61_d74c_46de_94f7_a33195f3a038;
386
387 private Ice.Lib.Framework.EpiTextBox epiTextBoxC7;
388
389 private Ice.Lib.Framework.EpiTextBox epiTextBoxC7_8361b0ff_09a4_4566_9a1d_1f895ae3d87e;
390
391 private Ice.Lib.Framework.EpiTextBox txtCarrierAcctNo;
392
393 private Ice.Lib.Framework.EpiTextBox txtCarrierAcctNo_6247443d_220c_4d04_a078_5769c79aafcf;
394
395 private Ice.Lib.Framework.EpiLabel epiLabelSalesRepCode1;
396
397 private Ice.Lib.Framework.EpiLabel epiLabelSalesRepCode1_9db1e8fe_4bec_4711_9ddd_a5d404e5ce49;
398
399 private Ice.Lib.Framework.EpiTextBox epiTextBoxSalesRepCode1;
400
401 private Ice.Lib.Framework.EpiTextBox epiTextBoxSalesRepCode1_921c33db_2c1a_441f_8767_e80bffdfadde;
402
403 private Ice.Lib.Framework.EpiLabel lblReceivedDate;
404
405 private Ice.Lib.Framework.EpiLabel lblReceivedDate_d2bbe9d8_5c71_4e15_8185_b34234d2ff45;
406
407 private Ice.Lib.Framework.EpiDateTimeEditor epiDateTimeEditorC2;
408
409 private Ice.Lib.Framework.EpiDateTimeEditor epiDateTimeEditorC2_7e27ea24_2dcf_4418_b394_c35b9a76bd7b;
410
411 private Ice.Lib.Framework.EpiLabel lblFitTech;
412
413 private Ice.Lib.Framework.EpiLabel lblFitTech_56fbc65b_0811_403b_be99_f2d2b6901306;
414
415 private Ice.Lib.Framework.EpiCombo cboFitTech;
416
417 private Ice.Lib.Framework.EpiCombo cboFitTech_57525ffd_72f8_4949_90b1_8b0fb4aaa065;
418
419 public void InitializeGlobalVariables(Ice.Lib.Customization.CustomScriptManager csm)
420 {
421 this.csm = csm;
422 this.oTrans = ((Erp.UI.App.SalesOrderEntry.Transaction)(this.csm.GetGlobalInstance("oTrans")));
423 this.SalesOrderForm = ((Erp.UI.App.SalesOrderEntry.SalesOrderForm)(this.csm.GetGlobalInstance("SalesOrderForm")));
424 this.baseToolbarsManager = ((Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)(this.csm.GetGlobalInstance("baseToolbarsManager")));
425 this.OrderRel_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderRel_Column")));
426 this.OrderRelTree_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderRelTree_Row")));
427 this.OrderMsc_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderMsc_Column")));
428 this.OrderMsc_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderMsc_Row")));
429 this.QuoteDtlAttch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("QuoteDtlAttch_Column")));
430 this.AutoAttachQuoteDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachQuoteDtl_Row")));
431 this.QuoteHedList_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("QuoteHedList_Column")));
432 this.QuoteHedList_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("QuoteHedList_Row")));
433 this.OrderHed_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderHed_Column")));
434 this.OrderHed_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderHed_Row")));
435 this.BookDtl_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("BookDtl_Column")));
436 this.BookDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("BookDtl_Row")));
437 this.SerialNumberSearch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("SerialNumberSearch_Column")));
438 this.SNS_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("SNS_Row")));
439 this.SaveOTSParams_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("SaveOTSParams_Column")));
440 this.SaveOTS_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("SaveOTS_Row")));
441 this.OrderHedList_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderHedList_Column")));
442 this.OrderHedList_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderHedList_Row")));
443 this.BpmData_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("BpmData_Column")));
444 this.CallContextBpmData_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CallContextBpmData_Row")));
445 this.ccTable_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ccTable_Column")));
446 this.CreditTran2_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CreditTran2_Row")));
447 this.SalesKitPartInfo_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("SalesKitPartInfo_Column")));
448 this.KitPartInfo_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("KitPartInfo_Row")));
449 this.OrderRel_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderRel_Row")));
450 this.OrderDtlAttch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderDtlAttch_Column")));
451 this.AutoAttachOrderDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachOrderDtl_Row")));
452 this.AutoAttachSalesKits_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachSalesKits_Row")));
453 this.QuoteDtl_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("QuoteDtl_Column")));
454 this.QuoteDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("QuoteDtl_Row")));
455 this.TaxConnectStatus_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("TaxConnectStatus_Column")));
456 this.TaxConnectStatus_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("TaxConnectStatus_Row")));
457 this.OrderRelTax_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderRelTax_Column")));
458 this.OrdRelTax_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrdRelTax_Row")));
459 this._Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("_Column")));
460 this.NoBoundField_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("NoBoundField_Row")));
461 this.OrderDtl_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderDtl_Column")));
462 this.SalesKits_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("SalesKits_Row")));
463 this.OHOrderMsc_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OHOrderMsc_Column")));
464 this.OHOrderMsc_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OHOrderMsc_Row")));
465 this.Client_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("Client_Column")));
466 this.CallContextClientData_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CallContextClientData_Row")));
467 this.OrderDtlTree_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderDtlTree_Row")));
468 this.OrderHedUPS_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderHedUPS_Column")));
469 this.OrderHedUPS_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderHedUPS_Row")));
470 this.OrderDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderDtl_Row")));
471 this.OrderRepComm_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderRepComm_Column")));
472 this.OrderRepComm_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderRepComm_Row")));
473 this.CreditTran_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("CreditTran_Column")));
474 this.CreditTran_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CreditTran_Row")));
475 this.CopyNew_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CopyNew_Row")));
476 this.HedTaxSum_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("HedTaxSum_Column")));
477 this.HedTaxSum_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("HedTaxSum_Row")));
478 this.JobProd_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("JobProd_Column")));
479 this.JobProd_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("JobProd_Row")));
480 this.OrderSched_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderSched_Column")));
481 this.OrderSched_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("OrderSched_Row")));
482 this.QuoteQty_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("QuoteQty_Column")));
483 this.QuoteQty_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("QuoteQty_Row")));
484 this.PartSubs_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("PartSubs_Column")));
485 this.AlternatePart_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AlternatePart_Row")));
486 this.AutoAttachOrderDtlTree_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachOrderDtlTree_Row")));
487 this.OrderHedAttch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("OrderHedAttch_Column")));
488 this.AutoAttachOrderHed_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachOrderHed_Row")));
489 this.QuoteHedAttch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("QuoteHedAttch_Column")));
490 this.AutoAttachQuoteHed_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachQuoteHed_Row")));
491 this.QuoteHed_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("QuoteHed_Column")));
492 this.QuoteHed_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("QuoteHed_Row")));
493 Ice.Lib.Customization.PersonalizeCustomizeManager personalizeCustomizeManager = this.csm.PersonalizeCustomizeManager;
494 System.Windows.Forms.Control topControl = personalizeCustomizeManager.TopControl;
495 topControl.FindForm().SuspendLayout();
496 // Creating custom targets.
497 this.epiLabelC1 = new Ice.Lib.Framework.EpiLabel();
498 this.epiLabelC1_e3a135f9_5a5d_4acc_bdfa_903304760694 = this.epiLabelC1;
499 System.Collections.Hashtable customControls = personalizeCustomizeManager.CustControlMan.CustomControlsHT;
500 customControls.Add("e3a135f9-5a5d-4acc-bdfa-903304760694", this.epiLabelC1);
501 System.Collections.Hashtable controlsHT = personalizeCustomizeManager.ControlsHT;
502 controlsHT.Add("e3a135f9-5a5d-4acc-bdfa-903304760694", this.epiLabelC1);
503 this.epiLabelC1.Name = "epiLabelC1";
504 this.epiLabelC1.EpiGuid = "e3a135f9-5a5d-4acc-bdfa-903304760694";
505 this.epiLabelC2 = new Ice.Lib.Framework.EpiLabel();
506 this.epiLabelC2_0ea5aad9_e947_423b_8fdc_9354006db4ff = this.epiLabelC2;
507 customControls.Add("0ea5aad9-e947-423b-8fdc-9354006db4ff", this.epiLabelC2);
508 controlsHT.Add("0ea5aad9-e947-423b-8fdc-9354006db4ff", this.epiLabelC2);
509 this.epiLabelC2.Name = "epiLabelC2";
510 this.epiLabelC2.EpiGuid = "0ea5aad9-e947-423b-8fdc-9354006db4ff";
511 this.epiLabel1 = new Ice.Lib.Framework.EpiLabel();
512 this.epiLabel1_cff20c3e_2165_403f_9df6_10ecb182ecf3 = this.epiLabel1;
513 customControls.Add("cff20c3e-2165-403f-9df6-10ecb182ecf3", this.epiLabel1);
514 controlsHT.Add("cff20c3e-2165-403f-9df6-10ecb182ecf3", this.epiLabel1);
515 this.epiLabel1.Name = "epiLabel1";
516 this.epiLabel1.EpiGuid = "cff20c3e-2165-403f-9df6-10ecb182ecf3";
517 this.epiTextBoxC1 = new Ice.Lib.Framework.EpiTextBox();
518 this.epiTextBoxC1_d7452973_f266_4fb1_9f50_86176582bf24 = this.epiTextBoxC1;
519 customControls.Add("d7452973-f266-4fb1-9f50-86176582bf24", this.epiTextBoxC1);
520 controlsHT.Add("d7452973-f266-4fb1-9f50-86176582bf24", this.epiTextBoxC1);
521 this.epiTextBoxC1.Name = "epiTextBoxC1";
522 this.epiTextBoxC1.EpiGuid = "d7452973-f266-4fb1-9f50-86176582bf24";
523 this.epiTextBoxC2 = new Ice.Lib.Framework.EpiTextBox();
524 this.epiTextBoxC2_176cff2f_225a_4610_94ef_000a2864cda0 = this.epiTextBoxC2;
525 customControls.Add("176cff2f-225a-4610-94ef-000a2864cda0", this.epiTextBoxC2);
526 controlsHT.Add("176cff2f-225a-4610-94ef-000a2864cda0", this.epiTextBoxC2);
527 this.epiTextBoxC2.Name = "epiTextBoxC2";
528 this.epiTextBoxC2.EpiGuid = "176cff2f-225a-4610-94ef-000a2864cda0";
529 this.epiTextBoxC3 = new Ice.Lib.Framework.EpiTextBox();
530 this.epiTextBoxC3_99151df7_883c_4c1c_b485_d883b5081423 = this.epiTextBoxC3;
531 customControls.Add("99151df7-883c-4c1c-b485-d883b5081423", this.epiTextBoxC3);
532 controlsHT.Add("99151df7-883c-4c1c-b485-d883b5081423", this.epiTextBoxC3);
533 this.epiTextBoxC3.Name = "epiTextBoxC3";
534 this.epiTextBoxC3.EpiGuid = "99151df7-883c-4c1c-b485-d883b5081423";
535 this.epiGroupBoxC1 = new Ice.Lib.Framework.EpiGroupBox();
536 this.epiGroupBoxC1_861c7222_896e_4323_89fa_dd2fc20e089d = this.epiGroupBoxC1;
537 customControls.Add("861c7222-896e-4323-89fa-dd2fc20e089d", this.epiGroupBoxC1);
538 controlsHT.Add("861c7222-896e-4323-89fa-dd2fc20e089d", this.epiGroupBoxC1);
539 this.epiGroupBoxC1.Name = "epiGroupBoxC1";
540 this.epiGroupBoxC1.EpiGuid = "861c7222-896e-4323-89fa-dd2fc20e089d";
541 this.empBasicComboC1 = Ice.Lib.Customization.Designers.RetrieverComboDesigner.CreateRetriever("ac1ee53e-0b23-47f6-9769-6095c17c2044", "EmpBasic", "EmpBasicCombo", personalizeCustomizeManager);
542 this.empBasicComboC1_ac1ee53e_0b23_47f6_9769_6095c17c2044 = this.empBasicComboC1;
543 customControls.Add("ac1ee53e-0b23-47f6-9769-6095c17c2044", this.empBasicComboC1);
544 controlsHT.Add("ac1ee53e-0b23-47f6-9769-6095c17c2044", this.empBasicComboC1);
545 this.empBasicComboC1.Name = "empBasicComboC1";
546 this.empBasicComboC1.EpiGuid = "ac1ee53e-0b23-47f6-9769-6095c17c2044";
547 this.epiLabelC3 = new Ice.Lib.Framework.EpiLabel();
548 this.epiLabelC3_99a98a01_c3ac_4fb5_8cea_fadec62a48d3 = this.epiLabelC3;
549 customControls.Add("99a98a01-c3ac-4fb5-8cea-fadec62a48d3", this.epiLabelC3);
550 controlsHT.Add("99a98a01-c3ac-4fb5-8cea-fadec62a48d3", this.epiLabelC3);
551 this.epiLabelC3.Name = "epiLabelC3";
552 this.epiLabelC3.EpiGuid = "99a98a01-c3ac-4fb5-8cea-fadec62a48d3";
553 this.btnSelectContact = new Ice.Lib.Framework.EpiButton();
554 this.btnSelectContact_083f1035_9ee3_4f28_a49b_e649a4b1ef07 = this.btnSelectContact;
555 customControls.Add("083f1035-9ee3-4f28-a49b-e649a4b1ef07", this.btnSelectContact);
556 controlsHT.Add("083f1035-9ee3-4f28-a49b-e649a4b1ef07", this.btnSelectContact);
557 this.btnSelectContact.Name = "btnSelectContact";
558 this.btnSelectContact.EpiGuid = "083f1035-9ee3-4f28-a49b-e649a4b1ef07";
559 this.epiNumericEditorC1 = new Ice.Lib.Framework.EpiNumericEditor();
560 this.epiNumericEditorC1_ca7ed2c7_7441_4b16_993a_3e759df6558f = this.epiNumericEditorC1;
561 customControls.Add("ca7ed2c7-7441-4b16-993a-3e759df6558f", this.epiNumericEditorC1);
562 controlsHT.Add("ca7ed2c7-7441-4b16-993a-3e759df6558f", this.epiNumericEditorC1);
563 this.epiNumericEditorC1.Name = "epiNumericEditorC1";
564 this.epiNumericEditorC1.EpiGuid = "ca7ed2c7-7441-4b16-993a-3e759df6558f";
565 this.cmvPerConName = new Ice.Lib.Framework.EpiUltraCombo();
566 this.cmvPerConName_75b07942_9780_420a_9470_9f5d3b854bc1 = this.cmvPerConName;
567 customControls.Add("75b07942-9780-420a-9470-9f5d3b854bc1", this.cmvPerConName);
568 controlsHT.Add("75b07942-9780-420a-9470-9f5d3b854bc1", this.cmvPerConName);
569 this.cmvPerConName.Name = "cmvPerConName";
570 this.cmvPerConName.EpiGuid = "75b07942-9780-420a-9470-9f5d3b854bc1";
571 this.epiLabelC4 = new Ice.Lib.Framework.EpiLabel();
572 this.epiLabelC4_0ba376e5_5be4_4241_9e59_ff6a202943c8 = this.epiLabelC4;
573 customControls.Add("0ba376e5-5be4-4241-9e59-ff6a202943c8", this.epiLabelC4);
574 controlsHT.Add("0ba376e5-5be4-4241-9e59-ff6a202943c8", this.epiLabelC4);
575 this.epiLabelC4.Name = "epiLabelC4";
576 this.epiLabelC4.EpiGuid = "0ba376e5-5be4-4241-9e59-ff6a202943c8";
577 this.cmbContactDOB = new Ice.Lib.Framework.EpiUltraCombo();
578 this.cmbContactDOB_15183d62_19c7_4a21_89fc_041569bddd1d = this.cmbContactDOB;
579 customControls.Add("15183d62-19c7-4a21-89fc-041569bddd1d", this.cmbContactDOB);
580 controlsHT.Add("15183d62-19c7-4a21-89fc-041569bddd1d", this.cmbContactDOB);
581 this.cmbContactDOB.Name = "cmbContactDOB";
582 this.cmbContactDOB.EpiGuid = "15183d62-19c7-4a21-89fc-041569bddd1d";
583 this.epiGroupBoxC2 = new Ice.Lib.Framework.EpiGroupBox();
584 this.epiGroupBoxC2_d46d8466_975c_47d9_afd6_a3d209400a9c = this.epiGroupBoxC2;
585 customControls.Add("d46d8466-975c-47d9-afd6-a3d209400a9c", this.epiGroupBoxC2);
586 controlsHT.Add("d46d8466-975c-47d9-afd6-a3d209400a9c", this.epiGroupBoxC2);
587 this.epiGroupBoxC2.Name = "epiGroupBoxC2";
588 this.epiGroupBoxC2.EpiGuid = "d46d8466-975c-47d9-afd6-a3d209400a9c";
589 this.epiLabelC5 = new Ice.Lib.Framework.EpiLabel();
590 this.epiLabelC5_865e5065_22b0_400c_b0a4_aac02471dba6 = this.epiLabelC5;
591 customControls.Add("865e5065-22b0-400c-b0a4-aac02471dba6", this.epiLabelC5);
592 controlsHT.Add("865e5065-22b0-400c-b0a4-aac02471dba6", this.epiLabelC5);
593 this.epiLabelC5.Name = "epiLabelC5";
594 this.epiLabelC5.EpiGuid = "865e5065-22b0-400c-b0a4-aac02471dba6";
595 this.txtFirstName = new Ice.Lib.Framework.EpiTextBox();
596 this.txtFirstName_2be92edc_ff56_4b31_a15a_46e25fe59ed4 = this.txtFirstName;
597 customControls.Add("2be92edc-ff56-4b31-a15a-46e25fe59ed4", this.txtFirstName);
598 controlsHT.Add("2be92edc-ff56-4b31-a15a-46e25fe59ed4", this.txtFirstName);
599 this.txtFirstName.Name = "txtFirstName";
600 this.txtFirstName.EpiGuid = "2be92edc-ff56-4b31-a15a-46e25fe59ed4";
601 this.epiLabelC6 = new Ice.Lib.Framework.EpiLabel();
602 this.epiLabelC6_c8d16e2d_2cac_4ac8_899c_b51966821ec2 = this.epiLabelC6;
603 customControls.Add("c8d16e2d-2cac-4ac8-899c-b51966821ec2", this.epiLabelC6);
604 controlsHT.Add("c8d16e2d-2cac-4ac8-899c-b51966821ec2", this.epiLabelC6);
605 this.epiLabelC6.Name = "epiLabelC6";
606 this.epiLabelC6.EpiGuid = "c8d16e2d-2cac-4ac8-899c-b51966821ec2";
607 this.epiLabelC7 = new Ice.Lib.Framework.EpiLabel();
608 this.epiLabelC7_04b8564e_4197_41c2_906d_011c9b81350e = this.epiLabelC7;
609 customControls.Add("04b8564e-4197-41c2-906d-011c9b81350e", this.epiLabelC7);
610 controlsHT.Add("04b8564e-4197-41c2-906d-011c9b81350e", this.epiLabelC7);
611 this.epiLabelC7.Name = "epiLabelC7";
612 this.epiLabelC7.EpiGuid = "04b8564e-4197-41c2-906d-011c9b81350e";
613 this.epiDateTimeEditorC1 = new Ice.Lib.Framework.EpiDateTimeEditor();
614 this.epiDateTimeEditorC1_d2a94790_bb2c_42df_a5a1_8e7a967e5e89 = this.epiDateTimeEditorC1;
615 customControls.Add("d2a94790-bb2c-42df-a5a1-8e7a967e5e89", this.epiDateTimeEditorC1);
616 controlsHT.Add("d2a94790-bb2c-42df-a5a1-8e7a967e5e89", this.epiDateTimeEditorC1);
617 this.epiDateTimeEditorC1.Name = "epiDateTimeEditorC1";
618 this.epiDateTimeEditorC1.EpiGuid = "d2a94790-bb2c-42df-a5a1-8e7a967e5e89";
619 this.btnCreateNewContact = new Ice.Lib.Framework.EpiButton();
620 this.btnCreateNewContact_78a10f50_af7a_44ef_9078_bc8a81137437 = this.btnCreateNewContact;
621 customControls.Add("78a10f50-af7a-44ef-9078-bc8a81137437", this.btnCreateNewContact);
622 controlsHT.Add("78a10f50-af7a-44ef-9078-bc8a81137437", this.btnCreateNewContact);
623 this.btnCreateNewContact.Name = "btnCreateNewContact";
624 this.btnCreateNewContact.EpiGuid = "78a10f50-af7a-44ef-9078-bc8a81137437";
625 this.epiTextBoxC4 = new Ice.Lib.Framework.EpiTextBox();
626 this.epiTextBoxC4_f14878e2_0e8d_403d_bd68_c354cfad6c54 = this.epiTextBoxC4;
627 customControls.Add("f14878e2-0e8d-403d-bd68-c354cfad6c54", this.epiTextBoxC4);
628 controlsHT.Add("f14878e2-0e8d-403d-bd68-c354cfad6c54", this.epiTextBoxC4);
629 this.epiTextBoxC4.Name = "epiTextBoxC4";
630 this.epiTextBoxC4.EpiGuid = "f14878e2-0e8d-403d-bd68-c354cfad6c54";
631 this.epiLabelC8 = new Ice.Lib.Framework.EpiLabel();
632 this.epiLabelC8_b3ffbad4_d2a9_4122_b9a7_a6836107d70b = this.epiLabelC8;
633 customControls.Add("b3ffbad4-d2a9-4122-b9a7-a6836107d70b", this.epiLabelC8);
634 controlsHT.Add("b3ffbad4-d2a9-4122-b9a7-a6836107d70b", this.epiLabelC8);
635 this.epiLabelC8.Name = "epiLabelC8";
636 this.epiLabelC8.EpiGuid = "b3ffbad4-d2a9-4122-b9a7-a6836107d70b";
637 this.cmbEmployeeNum = new Ice.Lib.Framework.EpiUltraCombo();
638 this.cmbEmployeeNum_5dda1115_e352_4546_92de_bad715e5ea32 = this.cmbEmployeeNum;
639 customControls.Add("5dda1115-e352-4546-92de-bad715e5ea32", this.cmbEmployeeNum);
640 controlsHT.Add("5dda1115-e352-4546-92de-bad715e5ea32", this.cmbEmployeeNum);
641 this.cmbEmployeeNum.Name = "cmbEmployeeNum";
642 this.cmbEmployeeNum.EpiGuid = "5dda1115-e352-4546-92de-bad715e5ea32";
643 this.epiLabelC1aa = new Ice.Lib.Framework.EpiLabel();
644 this.epiLabelC1aa_93eb9282_d276_46dc_919c_83178d357010 = this.epiLabelC1aa;
645 customControls.Add("93eb9282-d276-46dc-919c-83178d357010", this.epiLabelC1aa);
646 controlsHT.Add("93eb9282-d276-46dc-919c-83178d357010", this.epiLabelC1aa);
647 this.epiLabelC1aa.Name = "epiLabelC1aa";
648 this.epiLabelC1aa.EpiGuid = "93eb9282-d276-46dc-919c-83178d357010";
649 this.txtEmpNum = new Ice.Lib.Framework.EpiTextBox();
650 this.txtEmpNum_2332ab42_e00b_4339_960b_da0a8d8c6bec = this.txtEmpNum;
651 customControls.Add("2332ab42-e00b-4339-960b-da0a8d8c6bec", this.txtEmpNum);
652 controlsHT.Add("2332ab42-e00b-4339-960b-da0a8d8c6bec", this.txtEmpNum);
653 this.txtEmpNum.Name = "txtEmpNum";
654 this.txtEmpNum.EpiGuid = "2332ab42-e00b-4339-960b-da0a8d8c6bec";
655 this.Sheet1 = new Ice.Lib.Framework.EpiDockManagerPanel();
656 this.Sheet1_adbc0ab4_b441_46d9_ae92_b32960a53d07 = this.Sheet1;
657 customControls.Add("adbc0ab4-b441-46d9-ae92-b32960a53d07", this.Sheet1);
658 controlsHT.Add("adbc0ab4-b441-46d9-ae92-b32960a53d07", this.Sheet1);
659 this.Sheet1.Name = "Sheet1";
660 this.Sheet1.EpiGuid = "adbc0ab4-b441-46d9-ae92-b32960a53d07";
661 this.Sheet2 = new Ice.Lib.Framework.EpiDockManagerPanel();
662 this.Sheet2_7f5c5a31_d34c_412b_993d_8866b44f278b = this.Sheet2;
663 customControls.Add("7f5c5a31-d34c-412b-993d-8866b44f278b", this.Sheet2);
664 controlsHT.Add("7f5c5a31-d34c-412b-993d-8866b44f278b", this.Sheet2);
665 this.Sheet2.Name = "Sheet2";
666 this.Sheet2.EpiGuid = "7f5c5a31-d34c-412b-993d-8866b44f278b";
667 this.Sheet3 = new Ice.Lib.Framework.EpiDockManagerPanel();
668 this.Sheet3_eaab0101_2d15_4678_921f_525edb65bf89 = this.Sheet3;
669 customControls.Add("eaab0101-2d15-4678-921f-525edb65bf89", this.Sheet3);
670 controlsHT.Add("eaab0101-2d15-4678-921f-525edb65bf89", this.Sheet3);
671 this.Sheet3.Name = "Sheet3";
672 this.Sheet3.EpiGuid = "eaab0101-2d15-4678-921f-525edb65bf89";
673 this.grdDtlList = new Ice.Lib.Framework.EpiUltraGrid();
674 this.grdDtlList_71fd4fbb_38d8_4207_9712_0d8022341a17 = this.grdDtlList;
675 customControls.Add("71fd4fbb-38d8-4207-9712-0d8022341a17", this.grdDtlList);
676 controlsHT.Add("71fd4fbb-38d8-4207-9712-0d8022341a17", this.grdDtlList);
677 this.grdDtlList.Name = "grdDtlList";
678 this.grdDtlList.EpiGuid = "71fd4fbb-38d8-4207-9712-0d8022341a17";
679 this.epiGroupBoxC3 = new Ice.Lib.Framework.EpiGroupBox();
680 this.epiGroupBoxC3_cc88c880_a173_4547_bcc4_dc99c2a5aa86 = this.epiGroupBoxC3;
681 customControls.Add("cc88c880-a173-4547-bcc4-dc99c2a5aa86", this.epiGroupBoxC3);
682 controlsHT.Add("cc88c880-a173-4547-bcc4-dc99c2a5aa86", this.epiGroupBoxC3);
683 this.epiGroupBoxC3.Name = "epiGroupBoxC3";
684 this.epiGroupBoxC3.EpiGuid = "cc88c880-a173-4547-bcc4-dc99c2a5aa86";
685 this.epiLabelC9 = new Ice.Lib.Framework.EpiLabel();
686 this.epiLabelC9_2b32ec55_7087_4c0d_98a5_6dc5e01697f5 = this.epiLabelC9;
687 customControls.Add("2b32ec55-7087-4c0d-98a5-6dc5e01697f5", this.epiLabelC9);
688 controlsHT.Add("2b32ec55-7087-4c0d-98a5-6dc5e01697f5", this.epiLabelC9);
689 this.epiLabelC9.Name = "epiLabelC9";
690 this.epiLabelC9.EpiGuid = "2b32ec55-7087-4c0d-98a5-6dc5e01697f5";
691 this.epiLabelC10 = new Ice.Lib.Framework.EpiLabel();
692 this.epiLabelC10_edfe3fa7_3d56_4630_a12e_5106ae6b95cf = this.epiLabelC10;
693 customControls.Add("edfe3fa7-3d56-4630-a12e-5106ae6b95cf", this.epiLabelC10);
694 controlsHT.Add("edfe3fa7-3d56-4630-a12e-5106ae6b95cf", this.epiLabelC10);
695 this.epiLabelC10.Name = "epiLabelC10";
696 this.epiLabelC10.EpiGuid = "edfe3fa7-3d56-4630-a12e-5106ae6b95cf";
697 this.cmbSearchType = new Ice.Lib.Framework.EpiUltraCombo();
698 this.cmbSearchType_d8a0cba0_fd0f_4655_b18e_6bc972dbe676 = this.cmbSearchType;
699 customControls.Add("d8a0cba0-fd0f-4655-b18e-6bc972dbe676", this.cmbSearchType);
700 controlsHT.Add("d8a0cba0-fd0f-4655-b18e-6bc972dbe676", this.cmbSearchType);
701 this.cmbSearchType.Name = "cmbSearchType";
702 this.cmbSearchType.EpiGuid = "d8a0cba0-fd0f-4655-b18e-6bc972dbe676";
703 this.epiLabelC11 = new Ice.Lib.Framework.EpiLabel();
704 this.epiLabelC11_47617eef_27d0_44e7_bd5d_db99aaf795ce = this.epiLabelC11;
705 customControls.Add("47617eef-27d0-44e7-bd5d-db99aaf795ce", this.epiLabelC11);
706 controlsHT.Add("47617eef-27d0-44e7-bd5d-db99aaf795ce", this.epiLabelC11);
707 this.epiLabelC11.Name = "epiLabelC11";
708 this.epiLabelC11.EpiGuid = "47617eef-27d0-44e7-bd5d-db99aaf795ce";
709 this.epiTextBoxC5 = new Ice.Lib.Framework.EpiTextBox();
710 this.epiTextBoxC5_7fe56970_1ebf_4709_bb41_4ce0005dd485 = this.epiTextBoxC5;
711 customControls.Add("7fe56970-1ebf-4709-bb41-4ce0005dd485", this.epiTextBoxC5);
712 controlsHT.Add("7fe56970-1ebf-4709-bb41-4ce0005dd485", this.epiTextBoxC5);
713 this.epiTextBoxC5.Name = "epiTextBoxC5";
714 this.epiTextBoxC5.EpiGuid = "7fe56970-1ebf-4709-bb41-4ce0005dd485";
715 this.epiLabelC12 = new Ice.Lib.Framework.EpiLabel();
716 this.epiLabelC12_a4c9459a_23f7_400a_80ac_d1ea51010626 = this.epiLabelC12;
717 customControls.Add("a4c9459a-23f7-400a-80ac-d1ea51010626", this.epiLabelC12);
718 controlsHT.Add("a4c9459a-23f7-400a-80ac-d1ea51010626", this.epiLabelC12);
719 this.epiLabelC12.Name = "epiLabelC12";
720 this.epiLabelC12.EpiGuid = "a4c9459a-23f7-400a-80ac-d1ea51010626";
721 this.epiTextBoxC6 = new Ice.Lib.Framework.EpiTextBox();
722 this.epiTextBoxC6_96805b1c_337a_4eb5_b5cc_c08569d9ff7a = this.epiTextBoxC6;
723 customControls.Add("96805b1c-337a-4eb5-b5cc-c08569d9ff7a", this.epiTextBoxC6);
724 controlsHT.Add("96805b1c-337a-4eb5-b5cc-c08569d9ff7a", this.epiTextBoxC6);
725 this.epiTextBoxC6.Name = "epiTextBoxC6";
726 this.epiTextBoxC6.EpiGuid = "96805b1c-337a-4eb5-b5cc-c08569d9ff7a";
727 this.epiLabelC1comp = new Ice.Lib.Framework.EpiLabel();
728 this.epiLabelC1comp_c32e2c43_2eda_4200_a86a_b7a364ae5070 = this.epiLabelC1comp;
729 customControls.Add("c32e2c43-2eda-4200-a86a-b7a364ae5070", this.epiLabelC1comp);
730 controlsHT.Add("c32e2c43-2eda-4200-a86a-b7a364ae5070", this.epiLabelC1comp);
731 this.epiLabelC1comp.Name = "epiLabelC1comp";
732 this.epiLabelC1comp.EpiGuid = "c32e2c43-2eda-4200-a86a-b7a364ae5070";
733 this.txtCorpName = new Ice.Lib.Framework.EpiTextBox();
734 this.txtCorpName_70602aa3_216f_4b49_bc86_f28916a00838 = this.txtCorpName;
735 customControls.Add("70602aa3-216f-4b49-bc86-f28916a00838", this.txtCorpName);
736 controlsHT.Add("70602aa3-216f-4b49-bc86-f28916a00838", this.txtCorpName);
737 this.txtCorpName.Name = "txtCorpName";
738 this.txtCorpName.EpiGuid = "70602aa3-216f-4b49-bc86-f28916a00838";
739 this.epiLabelC13co = new Ice.Lib.Framework.EpiLabel();
740 this.epiLabelC13co_a4790422_9982_4dc1_b067_ce54e766c1ca = this.epiLabelC13co;
741 customControls.Add("a4790422-9982-4dc1-b067-ce54e766c1ca", this.epiLabelC13co);
742 controlsHT.Add("a4790422-9982-4dc1-b067-ce54e766c1ca", this.epiLabelC13co);
743 this.epiLabelC13co.Name = "epiLabelC13co";
744 this.epiLabelC13co.EpiGuid = "a4790422-9982-4dc1-b067-ce54e766c1ca";
745 this.epiTextBoxC7co = new Ice.Lib.Framework.EpiTextBox();
746 this.epiTextBoxC7co_b83d2486_c5a9_43c8_803b_8888683e7ee8 = this.epiTextBoxC7co;
747 customControls.Add("b83d2486-c5a9-43c8-803b-8888683e7ee8", this.epiTextBoxC7co);
748 controlsHT.Add("b83d2486-c5a9-43c8-803b-8888683e7ee8", this.epiTextBoxC7co);
749 this.epiTextBoxC7co.Name = "epiTextBoxC7co";
750 this.epiTextBoxC7co.EpiGuid = "b83d2486-c5a9-43c8-803b-8888683e7ee8";
751 this.epiGroupBoxC4 = new Ice.Lib.Framework.EpiGroupBox();
752 this.epiGroupBoxC4_7f0f2080_5d48_4965_b198_b5abd21808ad = this.epiGroupBoxC4;
753 customControls.Add("7f0f2080-5d48-4965-b198-b5abd21808ad", this.epiGroupBoxC4);
754 controlsHT.Add("7f0f2080-5d48-4965-b198-b5abd21808ad", this.epiGroupBoxC4);
755 this.epiGroupBoxC4.Name = "epiGroupBoxC4";
756 this.epiGroupBoxC4.EpiGuid = "7f0f2080-5d48-4965-b198-b5abd21808ad";
757 this.txtCustomerComments = new Ice.Lib.Framework.EpiTextBox();
758 this.txtCustomerComments_6f8f35a4_951a_4321_b607_409fdf473674 = this.txtCustomerComments;
759 customControls.Add("6f8f35a4-951a-4321-b607-409fdf473674", this.txtCustomerComments);
760 controlsHT.Add("6f8f35a4-951a-4321-b607-409fdf473674", this.txtCustomerComments);
761 this.txtCustomerComments.Name = "txtCustomerComments";
762 this.txtCustomerComments.EpiGuid = "6f8f35a4-951a-4321-b607-409fdf473674";
763 this.baqComboC1 = new Ice.Lib.Framework.BAQCombo();
764 this.baqComboC1_dbb6f21e_c202_4481_aecf_ec708f1c5cfc = this.baqComboC1;
765 customControls.Add("dbb6f21e-c202-4481-aecf-ec708f1c5cfc", this.baqComboC1);
766 controlsHT.Add("dbb6f21e-c202-4481-aecf-ec708f1c5cfc", this.baqComboC1);
767 this.baqComboC1.Name = "baqComboC1";
768 this.baqComboC1.EpiGuid = "dbb6f21e-c202-4481-aecf-ec708f1c5cfc";
769 this.btnRefreshContact = new Ice.Lib.Framework.EpiButton();
770 this.btnRefreshContact_e04e7880_2ecf_4f63_8982_39f691360c87 = this.btnRefreshContact;
771 customControls.Add("e04e7880-2ecf-4f63-8982-39f691360c87", this.btnRefreshContact);
772 controlsHT.Add("e04e7880-2ecf-4f63-8982-39f691360c87", this.btnRefreshContact);
773 this.btnRefreshContact.Name = "btnRefreshContact";
774 this.btnRefreshContact.EpiGuid = "e04e7880-2ecf-4f63-8982-39f691360c87";
775 this.txtCustomerPONum = new Ice.Lib.Framework.EpiTextBox();
776 this.txtCustomerPONum_687a17ed_1050_44f3_9aac_ae9c910aab0c = this.txtCustomerPONum;
777 customControls.Add("687a17ed-1050-44f3-9aac-ae9c910aab0c", this.txtCustomerPONum);
778 controlsHT.Add("687a17ed-1050-44f3-9aac-ae9c910aab0c", this.txtCustomerPONum);
779 this.txtCustomerPONum.Name = "txtCustomerPONum";
780 this.txtCustomerPONum.EpiGuid = "687a17ed-1050-44f3-9aac-ae9c910aab0c";
781 this.lblCustomerPONum = new Ice.Lib.Framework.EpiLabel();
782 this.lblCustomerPONum_cfb06a0e_5891_4251_b9e6_6d73c38575bc = this.lblCustomerPONum;
783 customControls.Add("cfb06a0e-5891-4251-b9e6-6d73c38575bc", this.lblCustomerPONum);
784 controlsHT.Add("cfb06a0e-5891-4251-b9e6-6d73c38575bc", this.lblCustomerPONum);
785 this.lblCustomerPONum.Name = "lblCustomerPONum";
786 this.lblCustomerPONum.EpiGuid = "cfb06a0e-5891-4251-b9e6-6d73c38575bc";
787 this.txtQuery = new Ice.Lib.Framework.EpiTextBox();
788 this.txtQuery_ff235923_b42a_41db_8183_05600a8a5e79 = this.txtQuery;
789 customControls.Add("ff235923-b42a-41db-8183-05600a8a5e79", this.txtQuery);
790 controlsHT.Add("ff235923-b42a-41db-8183-05600a8a5e79", this.txtQuery);
791 this.txtQuery.Name = "txtQuery";
792 this.txtQuery.EpiGuid = "ff235923-b42a-41db-8183-05600a8a5e79";
793 this.epiGroupBoxC5 = new Ice.Lib.Framework.EpiGroupBox();
794 this.epiGroupBoxC5_9b0aa4db_799b_4a8a_af54_f294666dfd04 = this.epiGroupBoxC5;
795 customControls.Add("9b0aa4db-799b-4a8a-af54-f294666dfd04", this.epiGroupBoxC5);
796 controlsHT.Add("9b0aa4db-799b-4a8a-af54-f294666dfd04", this.epiGroupBoxC5);
797 this.epiGroupBoxC5.Name = "epiGroupBoxC5";
798 this.epiGroupBoxC5.EpiGuid = "9b0aa4db-799b-4a8a-af54-f294666dfd04";
799 this.epiLabelC14 = new Ice.Lib.Framework.EpiLabel();
800 this.epiLabelC14_cd4d20fa_be1f_426e_958d_425ac53e7084 = this.epiLabelC14;
801 customControls.Add("cd4d20fa-be1f-426e-958d-425ac53e7084", this.epiLabelC14);
802 controlsHT.Add("cd4d20fa-be1f-426e-958d-425ac53e7084", this.epiLabelC14);
803 this.epiLabelC14.Name = "epiLabelC14";
804 this.epiLabelC14.EpiGuid = "cd4d20fa-be1f-426e-958d-425ac53e7084";
805 this.cmbHeaderPriceList = new Ice.Lib.Framework.EpiUltraCombo();
806 this.cmbHeaderPriceList_0efb8c61_d74c_46de_94f7_a33195f3a038 = this.cmbHeaderPriceList;
807 customControls.Add("0efb8c61-d74c-46de-94f7-a33195f3a038", this.cmbHeaderPriceList);
808 controlsHT.Add("0efb8c61-d74c-46de-94f7-a33195f3a038", this.cmbHeaderPriceList);
809 this.cmbHeaderPriceList.Name = "cmbHeaderPriceList";
810 this.cmbHeaderPriceList.EpiGuid = "0efb8c61-d74c-46de-94f7-a33195f3a038";
811 this.epiTextBoxC7 = new Ice.Lib.Framework.EpiTextBox();
812 this.epiTextBoxC7_8361b0ff_09a4_4566_9a1d_1f895ae3d87e = this.epiTextBoxC7;
813 customControls.Add("8361b0ff-09a4-4566-9a1d-1f895ae3d87e", this.epiTextBoxC7);
814 controlsHT.Add("8361b0ff-09a4-4566-9a1d-1f895ae3d87e", this.epiTextBoxC7);
815 this.epiTextBoxC7.Name = "epiTextBoxC7";
816 this.epiTextBoxC7.EpiGuid = "8361b0ff-09a4-4566-9a1d-1f895ae3d87e";
817 this.txtCarrierAcctNo = new Ice.Lib.Framework.EpiTextBox();
818 this.txtCarrierAcctNo_6247443d_220c_4d04_a078_5769c79aafcf = this.txtCarrierAcctNo;
819 customControls.Add("6247443d-220c-4d04-a078-5769c79aafcf", this.txtCarrierAcctNo);
820 controlsHT.Add("6247443d-220c-4d04-a078-5769c79aafcf", this.txtCarrierAcctNo);
821 this.txtCarrierAcctNo.Name = "txtCarrierAcctNo";
822 this.txtCarrierAcctNo.EpiGuid = "6247443d-220c-4d04-a078-5769c79aafcf";
823 this.epiLabelSalesRepCode1 = new Ice.Lib.Framework.EpiLabel();
824 this.epiLabelSalesRepCode1_9db1e8fe_4bec_4711_9ddd_a5d404e5ce49 = this.epiLabelSalesRepCode1;
825 customControls.Add("9db1e8fe-4bec-4711-9ddd-a5d404e5ce49", this.epiLabelSalesRepCode1);
826 controlsHT.Add("9db1e8fe-4bec-4711-9ddd-a5d404e5ce49", this.epiLabelSalesRepCode1);
827 this.epiLabelSalesRepCode1.Name = "epiLabelSalesRepCode1";
828 this.epiLabelSalesRepCode1.EpiGuid = "9db1e8fe-4bec-4711-9ddd-a5d404e5ce49";
829 this.epiTextBoxSalesRepCode1 = new Ice.Lib.Framework.EpiTextBox();
830 this.epiTextBoxSalesRepCode1_921c33db_2c1a_441f_8767_e80bffdfadde = this.epiTextBoxSalesRepCode1;
831 customControls.Add("921c33db-2c1a-441f-8767-e80bffdfadde", this.epiTextBoxSalesRepCode1);
832 controlsHT.Add("921c33db-2c1a-441f-8767-e80bffdfadde", this.epiTextBoxSalesRepCode1);
833 this.epiTextBoxSalesRepCode1.Name = "epiTextBoxSalesRepCode1";
834 this.epiTextBoxSalesRepCode1.EpiGuid = "921c33db-2c1a-441f-8767-e80bffdfadde";
835 this.lblReceivedDate = new Ice.Lib.Framework.EpiLabel();
836 this.lblReceivedDate_d2bbe9d8_5c71_4e15_8185_b34234d2ff45 = this.lblReceivedDate;
837 customControls.Add("d2bbe9d8-5c71-4e15-8185-b34234d2ff45", this.lblReceivedDate);
838 controlsHT.Add("d2bbe9d8-5c71-4e15-8185-b34234d2ff45", this.lblReceivedDate);
839 this.lblReceivedDate.Name = "lblReceivedDate";
840 this.lblReceivedDate.EpiGuid = "d2bbe9d8-5c71-4e15-8185-b34234d2ff45";
841 this.epiDateTimeEditorC2 = new Ice.Lib.Framework.EpiDateTimeEditor();
842 this.epiDateTimeEditorC2_7e27ea24_2dcf_4418_b394_c35b9a76bd7b = this.epiDateTimeEditorC2;
843 customControls.Add("7e27ea24-2dcf-4418-b394-c35b9a76bd7b", this.epiDateTimeEditorC2);
844 controlsHT.Add("7e27ea24-2dcf-4418-b394-c35b9a76bd7b", this.epiDateTimeEditorC2);
845 this.epiDateTimeEditorC2.Name = "epiDateTimeEditorC2";
846 this.epiDateTimeEditorC2.EpiGuid = "7e27ea24-2dcf-4418-b394-c35b9a76bd7b";
847 this.lblFitTech = new Ice.Lib.Framework.EpiLabel();
848 this.lblFitTech_56fbc65b_0811_403b_be99_f2d2b6901306 = this.lblFitTech;
849 customControls.Add("56fbc65b-0811-403b-be99-f2d2b6901306", this.lblFitTech);
850 controlsHT.Add("56fbc65b-0811-403b-be99-f2d2b6901306", this.lblFitTech);
851 this.lblFitTech.Name = "lblFitTech";
852 this.lblFitTech.EpiGuid = "56fbc65b-0811-403b-be99-f2d2b6901306";
853 this.cboFitTech = new Ice.Lib.Framework.EpiCombo();
854 this.cboFitTech_57525ffd_72f8_4949_90b1_8b0fb4aaa065 = this.cboFitTech;
855 customControls.Add("57525ffd-72f8-4949-90b1-8b0fb4aaa065", this.cboFitTech);
856 controlsHT.Add("57525ffd-72f8-4949-90b1-8b0fb4aaa065", this.cboFitTech);
857 this.cboFitTech.Name = "cboFitTech";
858 this.cboFitTech.EpiGuid = "57525ffd-72f8-4949-90b1-8b0fb4aaa065";
859 // lineDetailPanel1
860 Ice.Lib.Framework.EpiBasePanel local1 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["08909a88-e65f-46a1-acf5-84121694376d"]));
861 local1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
862 local1.Width = 1439;
863 local1.Height = 677;
864 local1.Controls.Add(this.epiGroupBoxC1);
865 local1.Controls.Add(this.epiGroupBoxC2);
866 local1.Controls.SetChildIndex(this.epiGroupBoxC1, 0);
867 local1.Controls.SetChildIndex(this.epiGroupBoxC2, 0);
868 System.Collections.Hashtable nativeSheets = personalizeCustomizeManager.NativeSheetsDCPsHT;
869 Infragistics.Win.UltraWinDock.DockableControlPane local2 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local1, "08909a88-e65f-46a1-acf5-84121694376d", nativeSheets);
870 // grpDetail2
871 Ice.Lib.Framework.EpiGroupBox local3 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["492bed80-396e-4065-b9b1-8807fdfcb421"]));
872 local3.Top = 322;
873 local3.Left = 7;
874 local3.Controls.Add(this.epiLabelC1);
875 local3.Controls.Add(this.epiLabelC2);
876 local3.Controls.Add(this.epiLabel1);
877 local3.Controls.Add(this.epiTextBoxC1);
878 local3.Controls.Add(this.epiTextBoxC2);
879 local3.Controls.Add(this.epiTextBoxC3);
880 local3.Controls.SetChildIndex(this.epiLabelC1, 0);
881 local3.Controls.SetChildIndex(this.epiLabelC2, 0);
882 local3.Controls.SetChildIndex(this.epiLabel1, 0);
883 local3.Controls.SetChildIndex(this.epiTextBoxC1, 0);
884 local3.Controls.SetChildIndex(this.epiTextBoxC2, 0);
885 local3.Controls.SetChildIndex(this.epiTextBoxC3, 0);
886 // epiLabelC1
887 this.epiLabelC1.Top = 206;
888 this.epiLabelC1.Left = 391;
889 this.epiLabelC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
890 this.epiLabelC1.Width = 60;
891 this.epiLabelC1.Height = 20;
892 this.epiLabelC1.Text = "Cast:";
893 // epiLabelC2
894 this.epiLabelC2.Top = 227;
895 this.epiLabelC2.Left = 613;
896 this.epiLabelC2.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
897 this.epiLabelC2.Width = 81;
898 this.epiLabelC2.Height = 20;
899 this.epiLabelC2.Text = "Left Mould:";
900 // epiLabel1
901 this.epiLabel1.Top = 204;
902 this.epiLabel1.Left = 613;
903 this.epiLabel1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
904 this.epiLabel1.Width = 81;
905 this.epiLabel1.Height = 20;
906 this.epiLabel1.Text = "Right Mould:";
907 // epiTextBoxC1
908 this.epiTextBoxC1.Top = 205;
909 this.epiTextBoxC1.Left = 464;
910 this.epiTextBoxC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
911 this.epiTextBoxC1.Width = 116;
912 this.epiTextBoxC1.Height = 20;
913 this.epiTextBoxC1.Text = "";
914 this.epiTextBoxC1.EpiBinding = "OrderDtl.CPE_Cast_c";
915 this.epiTextBoxC1.EpiLabel = "epiLabelC1";
916 // epiTextBoxC2
917 this.epiTextBoxC2.Top = 227;
918 this.epiTextBoxC2.Left = 700;
919 this.epiTextBoxC2.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
920 this.epiTextBoxC2.Width = 114;
921 this.epiTextBoxC2.Height = 20;
922 this.epiTextBoxC2.Text = "";
923 this.epiTextBoxC2.EpiBinding = "OrderDtl.CPE_DspMouldLeft_c";
924 this.epiTextBoxC2.EpiLabel = "epiLabelC2";
925 // epiTextBoxC3
926 this.epiTextBoxC3.Top = 204;
927 this.epiTextBoxC3.Left = 700;
928 this.epiTextBoxC3.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
929 this.epiTextBoxC3.Width = 114;
930 this.epiTextBoxC3.Height = 20;
931 this.epiTextBoxC3.Text = "";
932 this.epiTextBoxC3.EpiBinding = "OrderDtl.CPE_DspMouldRight_c";
933 this.epiTextBoxC3.EpiLabel = "epiLabel1";
934 // epiGroupBoxC1
935 this.epiGroupBoxC1.Top = 180;
936 this.epiGroupBoxC1.Left = 7;
937 this.epiGroupBoxC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
938 this.epiGroupBoxC1.Width = 822;
939 this.epiGroupBoxC1.Height = 70;
940 this.epiGroupBoxC1.Text = "Contacts";
941 this.epiGroupBoxC1.Controls.Add(this.empBasicComboC1);
942 this.epiGroupBoxC1.Controls.Add(this.epiLabelC3);
943 this.epiGroupBoxC1.Controls.Add(this.btnSelectContact);
944 this.epiGroupBoxC1.Controls.Add(this.epiNumericEditorC1);
945 this.epiGroupBoxC1.Controls.Add(this.cmvPerConName);
946 this.epiGroupBoxC1.Controls.Add(this.epiLabelC4);
947 this.epiGroupBoxC1.Controls.Add(this.cmbContactDOB);
948 this.epiGroupBoxC1.Controls.Add(this.epiLabelC8);
949 this.epiGroupBoxC1.Controls.Add(this.cmbEmployeeNum);
950 this.epiGroupBoxC1.Controls.Add(this.epiLabelC13co);
951 this.epiGroupBoxC1.Controls.Add(this.epiTextBoxC7co);
952 this.epiGroupBoxC1.Controls.Add(this.btnRefreshContact);
953 this.epiGroupBoxC1.Controls.Add(this.epiTextBoxC7);
954 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiTextBoxC7, 0);
955 this.epiGroupBoxC1.Controls.SetChildIndex(this.empBasicComboC1, 1);
956 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiLabelC3, 1);
957 this.epiGroupBoxC1.Controls.SetChildIndex(this.btnSelectContact, 1);
958 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiNumericEditorC1, 1);
959 this.epiGroupBoxC1.Controls.SetChildIndex(this.cmvPerConName, 1);
960 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiLabelC4, 1);
961 this.epiGroupBoxC1.Controls.SetChildIndex(this.cmbContactDOB, 1);
962 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiLabelC8, 1);
963 this.epiGroupBoxC1.Controls.SetChildIndex(this.cmbEmployeeNum, 1);
964 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiLabelC13co, 1);
965 this.epiGroupBoxC1.Controls.SetChildIndex(this.epiTextBoxC7co, 1);
966 this.epiGroupBoxC1.Controls.SetChildIndex(this.btnRefreshContact, 1);
967 // empBasicComboC1
968 this.empBasicComboC1.Top = -73;
969 this.empBasicComboC1.Left = 179;
970 this.empBasicComboC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
971 this.empBasicComboC1.Width = 244;
972 this.empBasicComboC1.Text = "";
973 this.empBasicComboC1.EpiBinding = "OrderDtl.EmployeeNum_c";
974 this.empBasicComboC1.EpiLabel = "epiLabelC3";
975 // erp.adapters.empbasic.dll
976 // epiLabelC3
977 this.epiLabelC3.Top = -73;
978 this.epiLabelC3.Left = 85;
979 this.epiLabelC3.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
980 this.epiLabelC3.Width = 88;
981 this.epiLabelC3.Height = 20;
982 this.epiLabelC3.Text = "Employee:";
983 // btnSelectContact
984 this.btnSelectContact.Top = 16;
985 this.btnSelectContact.Left = 7;
986 this.btnSelectContact.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
987 this.btnSelectContact.Width = 145;
988 this.btnSelectContact.Height = 22;
989 this.btnSelectContact.TabStop = false;
990 this.btnSelectContact.Text = "Person / Contact...";
991 // epiNumericEditorC1
992 this.epiNumericEditorC1.Top = 18;
993 this.epiNumericEditorC1.Left = 155;
994 this.epiNumericEditorC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
995 this.epiNumericEditorC1.Width = 72;
996 this.epiNumericEditorC1.EpiBinding = "OrderDtl.PerCon_c";
997 this.epiNumericEditorC1.EpiContextMenuKey = "PerCon.PerConID";
998 this.epiNumericEditorC1.Nullable = true;
999 // cmvPerConName
1000 this.cmvPerConName.Top = 18;
1001 this.cmvPerConName.Left = 230;
1002 this.cmvPerConName.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1003 this.cmvPerConName.Width = 272;
1004 this.cmvPerConName.TabStop = false;
1005 this.cmvPerConName.Text = "";
1006 this.cmvPerConName.EpiBinding = "OrderDtl.PerConDropDown_c";
1007 // epiLabelC4
1008 this.epiLabelC4.Top = 41;
1009 this.epiLabelC4.Left = 89;
1010 this.epiLabelC4.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1011 this.epiLabelC4.Width = 60;
1012 this.epiLabelC4.Height = 20;
1013 this.epiLabelC4.Text = "DOB:";
1014 // cmbContactDOB
1015 this.cmbContactDOB.Top = 41;
1016 this.cmbContactDOB.Left = 155;
1017 this.cmbContactDOB.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1018 this.cmbContactDOB.Width = 84;
1019 this.cmbContactDOB.TabStop = false;
1020 this.cmbContactDOB.Text = "";
1021 this.cmbContactDOB.EpiBinding = "OrderDtl.PerConDropDown_c";
1022 this.cmbContactDOB.EpiLabel = "epiLabelC4";
1023 // epiGroupBoxC2
1024 this.epiGroupBoxC2.Top = 250;
1025 this.epiGroupBoxC2.Left = 7;
1026 this.epiGroupBoxC2.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1027 this.epiGroupBoxC2.Width = 822;
1028 this.epiGroupBoxC2.Height = 70;
1029 this.epiGroupBoxC2.Text = "New Contact";
1030 this.epiGroupBoxC2.Controls.Add(this.epiLabelC5);
1031 this.epiGroupBoxC2.Controls.Add(this.txtFirstName);
1032 this.epiGroupBoxC2.Controls.Add(this.epiLabelC6);
1033 this.epiGroupBoxC2.Controls.Add(this.epiLabelC7);
1034 this.epiGroupBoxC2.Controls.Add(this.epiDateTimeEditorC1);
1035 this.epiGroupBoxC2.Controls.Add(this.btnCreateNewContact);
1036 this.epiGroupBoxC2.Controls.Add(this.epiTextBoxC4);
1037 this.epiGroupBoxC2.Controls.Add(this.epiLabelC1aa);
1038 this.epiGroupBoxC2.Controls.Add(this.txtEmpNum);
1039 this.epiGroupBoxC2.Controls.Add(this.epiLabelC1comp);
1040 this.epiGroupBoxC2.Controls.Add(this.txtCorpName);
1041 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiLabelC7, 0);
1042 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiDateTimeEditorC1, 0);
1043 this.epiGroupBoxC2.Controls.SetChildIndex(this.btnCreateNewContact, 0);
1044 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiTextBoxC4, 0);
1045 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiLabelC1aa, 0);
1046 this.epiGroupBoxC2.Controls.SetChildIndex(this.txtEmpNum, 0);
1047 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiLabelC1comp, 0);
1048 this.epiGroupBoxC2.Controls.SetChildIndex(this.txtCorpName, 0);
1049 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiLabelC5, 1);
1050 this.epiGroupBoxC2.Controls.SetChildIndex(this.txtFirstName, 1);
1051 this.epiGroupBoxC2.Controls.SetChildIndex(this.epiLabelC6, 1);
1052 // epiLabelC5
1053 this.epiLabelC5.Top = 13;
1054 this.epiLabelC5.Left = 66;
1055 this.epiLabelC5.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1056 this.epiLabelC5.Width = 83;
1057 this.epiLabelC5.Height = 20;
1058 this.epiLabelC5.Text = "First Name:";
1059 // txtFirstName
1060 this.txtFirstName.Top = 13;
1061 this.txtFirstName.Left = 155;
1062 this.txtFirstName.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1063 this.txtFirstName.Width = 198;
1064 this.txtFirstName.Height = 20;
1065 this.txtFirstName.Text = "";
1066 // epiLabelC6
1067 this.epiLabelC6.Top = 11;
1068 this.epiLabelC6.Left = 358;
1069 this.epiLabelC6.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1070 this.epiLabelC6.Width = 68;
1071 this.epiLabelC6.Height = 20;
1072 this.epiLabelC6.Text = "Last Name:";
1073 // epiLabelC7
1074 this.epiLabelC7.Top = 36;
1075 this.epiLabelC7.Left = 74;
1076 this.epiLabelC7.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1077 this.epiLabelC7.Width = 75;
1078 this.epiLabelC7.Height = 20;
1079 this.epiLabelC7.Text = "DOB:";
1080 // epiDateTimeEditorC1
1081 this.epiDateTimeEditorC1.Top = 36;
1082 this.epiDateTimeEditorC1.Left = 155;
1083 this.epiDateTimeEditorC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1084 this.epiDateTimeEditorC1.Width = 92;
1085 this.epiDateTimeEditorC1.TabIndex = 3;
1086 // btnCreateNewContact
1087 this.btnCreateNewContact.Top = 38;
1088 this.btnCreateNewContact.Left = 639;
1089 this.btnCreateNewContact.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1090 this.btnCreateNewContact.Width = 154;
1091 this.btnCreateNewContact.Height = 20;
1092 this.btnCreateNewContact.TabIndex = 4;
1093 this.btnCreateNewContact.Text = "Create Contact and Select";
1094 // epiTextBoxC4
1095 this.epiTextBoxC4.Top = 11;
1096 this.epiTextBoxC4.Left = 432;
1097 this.epiTextBoxC4.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1098 this.epiTextBoxC4.Width = 198;
1099 this.epiTextBoxC4.Height = 20;
1100 this.epiTextBoxC4.TabIndex = 2;
1101 this.epiTextBoxC4.Text = "";
1102 this.epiTextBoxC4.EpiLabel = "epiLabelC6";
1103 // ice.contracts.lib.boreader.dll
1104 // erp.contracts.bo.percon.dll
1105 // epiLabelC8
1106 this.epiLabelC8.Top = 40;
1107 this.epiLabelC8.Left = 263;
1108 this.epiLabelC8.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1109 this.epiLabelC8.Width = 121;
1110 this.epiLabelC8.Height = 20;
1111 this.epiLabelC8.Text = "Employee Num:";
1112 // cmbEmployeeNum
1113 this.cmbEmployeeNum.Top = 85;
1114 this.cmbEmployeeNum.Left = 387;
1115 this.cmbEmployeeNum.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1116 this.cmbEmployeeNum.Width = 151;
1117 this.cmbEmployeeNum.Text = "";
1118 this.cmbEmployeeNum.EpiLabel = "epiLabelC8";
1119 // epiLabelC1aa
1120 this.epiLabelC1aa.Top = 36;
1121 this.epiLabelC1aa.Left = 253;
1122 this.epiLabelC1aa.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1123 this.epiLabelC1aa.Width = 65;
1124 this.epiLabelC1aa.Height = 20;
1125 this.epiLabelC1aa.Text = "Emp Num:";
1126 // txtEmpNum
1127 this.txtEmpNum.Top = 36;
1128 this.txtEmpNum.Left = 324;
1129 this.txtEmpNum.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1130 this.txtEmpNum.Width = 111;
1131 this.txtEmpNum.Height = 20;
1132 this.txtEmpNum.Text = "";
1133 this.txtEmpNum.EpiLabel = "epiLabelC1aa";
1134 // Sheet1
1135 this.Sheet1.Top = 20;
1136 this.Sheet1.Left = 0;
1137 this.Sheet1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1138 this.Sheet1.Width = 950;
1139 this.Sheet1.Height = 686;
1140 this.Sheet1.AutoScroll = true;
1141 System.Collections.Hashtable customSheets = personalizeCustomizeManager.CustControlMan.CustomSheetsHT;
1142 Infragistics.Win.UltraWinDock.DockableControlPane local4 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.InitializeSheet(this.Sheet1, "adbc0ab4-b441-46d9-ae92-b32960a53d07", customSheets);
1143 if ((local4 != null))
1144 {
1145 Ice.Lib.Customization.Designers.EpiDockManagerPanelDesigner.AddCustomDockManager(personalizeCustomizeManager, this.Sheet1);
1146 local4.Text = "";
1147 local4.TextTab = "Order Line Entry";
1148 Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.AddCustomSheetToDockManager(personalizeCustomizeManager, local4, "baseDockManagered38e9a5-9e46-4ee3-98e9-a4acf1e72715");
1149 }
1150 // Sheet2
1151 this.Sheet2.Controls.Add(this.grdDtlList);
1152 this.Sheet2.Controls.SetChildIndex(this.grdDtlList, 0);
1153 this.Sheet2.AutoScroll = true;
1154 Infragistics.Win.UltraWinDock.DockableControlPane local5 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.InitializeSheet(this.Sheet2, "7f5c5a31-d34c-412b-993d-8866b44f278b", customSheets);
1155 if ((local5 != null))
1156 {
1157 Ice.Lib.Customization.Designers.EpiDockManagerPanelDesigner.AddCustomDockManager(personalizeCustomizeManager, this.Sheet2);
1158 local5.Text = "";
1159 local5.TextTab = "List";
1160 Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.AddCustomSheetToDockManager(personalizeCustomizeManager, local5, "baseDockManageradbc0ab4-b441-46d9-ae92-b32960a53d07");
1161 }
1162 // Sheet3
1163 this.Sheet3.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1164 this.Sheet3.Width = 1449;
1165 this.Sheet3.Height = 34;
1166 this.Sheet3.Controls.Add(this.epiLabelC10);
1167 this.Sheet3.Controls.Add(this.cmbSearchType);
1168 this.Sheet3.Controls.SetChildIndex(this.cmbSearchType, 0);
1169 this.Sheet3.Controls.SetChildIndex(this.epiLabelC10, 1);
1170 this.Sheet3.AutoScroll = true;
1171 Infragistics.Win.UltraWinDock.DockableControlPane local6 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.InitializeSheet(this.Sheet3, "eaab0101-2d15-4678-921f-525edb65bf89", customSheets);
1172 if ((local6 != null))
1173 {
1174 Ice.Lib.Customization.Designers.EpiDockManagerPanelDesigner.AddCustomDockManager(personalizeCustomizeManager, this.Sheet3);
1175 local6.Text = "";
1176 local6.TextTab = "Detail";
1177 Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.AddCustomSheetToDockManager(personalizeCustomizeManager, local6, "baseDockManageradbc0ab4-b441-46d9-ae92-b32960a53d07");
1178 }
1179 // grdDtlList
1180 this.grdDtlList.Top = 0;
1181 this.grdDtlList.Left = -136;
1182 this.grdDtlList.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1183 this.grdDtlList.Width = 2407;
1184 this.grdDtlList.Height = 1498;
1185 this.grdDtlList.Text = "";
1186 this.grdDtlList.EpiBinding = "OrderDtl";
1187 // ice.adapters.dynamicquery.dll
1188 // ice.contracts.bo.dynamicquery.dll
1189 // summaryPanel1
1190 Ice.Lib.Framework.EpiBasePanel local7 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["006caf0c-d74d-4ec1-9d92-43eda1f2af96"]));
1191 local7.Controls.Add(this.epiGroupBoxC3);
1192 local7.Controls.Add(this.epiGroupBoxC4);
1193 Ice.Lib.Framework.EpiButton local8 = ((Ice.Lib.Framework.EpiButton)(personalizeCustomizeManager.ControlsHT["ceda140d-f210-468c-9f89-02f79ba8055e"]));
1194 local7.Controls.SetChildIndex(local8, 0);
1195 Ice.Lib.Framework.EpiCheckBox local9 = ((Ice.Lib.Framework.EpiCheckBox)(personalizeCustomizeManager.ControlsHT["1161ef95-83de-4176-9160-0f78a4cf1e5e"]));
1196 local7.Controls.SetChildIndex(local9, 1);
1197 Ice.Lib.Framework.EpiLabel local10 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["c2a7cf5b-b3e3-42b4-9327-4f5c1ed3dc27"]));
1198 local7.Controls.SetChildIndex(local10, 2);
1199 Ice.Lib.Framework.EpiGroupBox local11 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["e0d06017-f282-4188-bc11-70ff28ca7547"]));
1200 local7.Controls.SetChildIndex(local11, 6);
1201 local7.Controls.SetChildIndex(this.epiGroupBoxC4, 7);
1202 local7.Controls.SetChildIndex(this.epiGroupBoxC3, 8);
1203 Ice.Lib.Framework.EpiButton local12 = ((Ice.Lib.Framework.EpiButton)(personalizeCustomizeManager.ControlsHT["2791c90c-41ed-4b1c-9e75-953a350edf42"]));
1204 local7.Controls.SetChildIndex(local12, 26);
1205 Infragistics.Win.UltraWinDock.DockableControlPane local13 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local7, "006caf0c-d74d-4ec1-9d92-43eda1f2af96", nativeSheets);
1206 // epiGroupBoxC3
1207 this.epiGroupBoxC3.Top = 360;
1208 this.epiGroupBoxC3.Left = 430;
1209 this.epiGroupBoxC3.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1210 this.epiGroupBoxC3.Width = 148;
1211 this.epiGroupBoxC3.Height = 43;
1212 this.epiGroupBoxC3.Text = "Manufacture Site";
1213 this.epiGroupBoxC3.Controls.Add(this.epiLabelC9);
1214 this.epiGroupBoxC3.Controls.Add(this.baqComboC1);
1215 this.epiGroupBoxC3.Controls.SetChildIndex(this.baqComboC1, 0);
1216 this.epiGroupBoxC3.Controls.SetChildIndex(this.epiLabelC9, 1);
1217 // epiLabelC9
1218 this.epiLabelC9.Top = 16;
1219 this.epiLabelC9.Left = -1;
1220 this.epiLabelC9.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1221 this.epiLabelC9.Width = 31;
1222 this.epiLabelC9.Height = 20;
1223 this.epiLabelC9.Text = "Site:";
1224 // erp.adapters.plant.dll
1225 // epiLabelC10
1226 this.epiLabelC10.Top = 6;
1227 this.epiLabelC10.Left = 12;
1228 this.epiLabelC10.Width = 132;
1229 this.epiLabelC10.Height = 20;
1230 this.epiLabelC10.Text = "Contact Search Type:";
1231 // cmbSearchType
1232 this.cmbSearchType.Top = 6;
1233 this.cmbSearchType.Left = 150;
1234 this.cmbSearchType.Width = 252;
1235 this.cmbSearchType.Text = "";
1236 this.cmbSearchType.EpiLabel = "epiLabelC10";
1237 this.cmbSearchType.DataSource = new string[] {
1238 "3 Character Last Name Auto Search",
1239 "Button Click Search"};
1240 // grpHeaderData
1241 local11.Width = 415;
1242 local11.Height = 185;
1243 local11.Controls.Add(this.epiLabelC11);
1244 local11.Controls.Add(this.epiTextBoxC5);
1245 local11.Controls.Add(this.txtCustomerPONum);
1246 local11.Controls.Add(this.lblCustomerPONum);
1247 local11.Controls.Add(this.txtCarrierAcctNo);
1248 local11.Controls.Add(this.epiLabelSalesRepCode1);
1249 local11.Controls.Add(this.epiTextBoxSalesRepCode1);
1250 local11.Controls.Add(this.lblReceivedDate);
1251 local11.Controls.Add(this.epiDateTimeEditorC2);
1252 local11.Controls.Add(this.lblFitTech);
1253 local11.Controls.Add(this.cboFitTech);
1254 local11.Controls.SetChildIndex(this.txtCustomerPONum, 0);
1255 local11.Controls.SetChildIndex(this.lblFitTech, 0);
1256 local11.Controls.SetChildIndex(this.cboFitTech, 0);
1257 local11.Controls.SetChildIndex(this.epiLabelC11, 1);
1258 local11.Controls.SetChildIndex(this.epiTextBoxC5, 1);
1259 local11.Controls.SetChildIndex(this.lblCustomerPONum, 1);
1260 local11.Controls.SetChildIndex(this.txtCarrierAcctNo, 1);
1261 local11.Controls.SetChildIndex(this.epiLabelSalesRepCode1, 1);
1262 local11.Controls.SetChildIndex(this.epiTextBoxSalesRepCode1, 1);
1263 local11.Controls.SetChildIndex(this.lblReceivedDate, 1);
1264 local11.Controls.SetChildIndex(this.epiDateTimeEditorC2, 1);
1265 // epiLabelC11
1266 this.epiLabelC11.Top = 134;
1267 this.epiLabelC11.Left = 11;
1268 this.epiLabelC11.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1269 this.epiLabelC11.Width = 90;
1270 this.epiLabelC11.Height = 20;
1271 this.epiLabelC11.Text = "Opportunity #:";
1272 // epiTextBoxC5
1273 this.epiTextBoxC5.Top = 134;
1274 this.epiTextBoxC5.Left = 106;
1275 this.epiTextBoxC5.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1276 this.epiTextBoxC5.Width = 87;
1277 this.epiTextBoxC5.Height = 20;
1278 this.epiTextBoxC5.Text = "";
1279 this.epiTextBoxC5.EpiBinding = "OrderHed.OpportunityNum_c";
1280 this.epiTextBoxC5.EpiLabel = "epiLabelC11";
1281 // headerPanel1
1282 Ice.Lib.Framework.EpiBasePanel local14 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["4f74bb83-3b2c-422e-8743-696989560c58"]));
1283 local14.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1284 local14.Width = 1447;
1285 local14.Height = 634;
1286 local14.Controls.Add(this.txtQuery);
1287 local14.Controls.Add(this.epiGroupBoxC5);
1288 local14.Controls.SetChildIndex(this.epiGroupBoxC5, 0);
1289 local14.Controls.SetChildIndex(this.txtQuery, 1);
1290 Infragistics.Win.UltraWinDock.DockableControlPane local15 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local14, "4f74bb83-3b2c-422e-8743-696989560c58", nativeSheets);
1291 // grpHeaderData
1292 Ice.Lib.Framework.EpiGroupBox local16 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["924845d8-1071-4d07-be20-c367f6bff8d9"]));
1293 local16.Controls.Add(this.epiLabelC12);
1294 local16.Controls.Add(this.epiTextBoxC6);
1295 local16.Controls.SetChildIndex(this.epiLabelC12, 0);
1296 local16.Controls.SetChildIndex(this.epiTextBoxC6, 0);
1297 // epiLabelC12
1298 this.epiLabelC12.Top = 128;
1299 this.epiLabelC12.Left = 15;
1300 this.epiLabelC12.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1301 this.epiLabelC12.Width = 84;
1302 this.epiLabelC12.Height = 20;
1303 this.epiLabelC12.Text = "Opportunity #:";
1304 // epiTextBoxC6
1305 this.epiTextBoxC6.Top = 128;
1306 this.epiTextBoxC6.Left = 105;
1307 this.epiTextBoxC6.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1308 this.epiTextBoxC6.Width = 144;
1309 this.epiTextBoxC6.Height = 20;
1310 this.epiTextBoxC6.Text = "";
1311 this.epiTextBoxC6.EpiBinding = "OrderHed.OpportunityNum_c";
1312 this.epiTextBoxC6.EpiLabel = "epiLabelC12";
1313 // epiLabelC1comp
1314 this.epiLabelC1comp.Top = 37;
1315 this.epiLabelC1comp.Left = 447;
1316 this.epiLabelC1comp.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1317 this.epiLabelC1comp.Width = 64;
1318 this.epiLabelC1comp.Height = 20;
1319 this.epiLabelC1comp.Text = "Company:";
1320 // txtCorpName
1321 this.txtCorpName.Top = 37;
1322 this.txtCorpName.Left = 517;
1323 this.txtCorpName.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1324 this.txtCorpName.Width = 111;
1325 this.txtCorpName.Height = 20;
1326 this.txtCorpName.Text = "";
1327 this.txtCorpName.EpiBinding = "";
1328 this.txtCorpName.EpiLabel = "epiLabelC1comp";
1329 // epiLabelC13co
1330 this.epiLabelC13co.Top = 41;
1331 this.epiLabelC13co.Left = 518;
1332 this.epiLabelC13co.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1333 this.epiLabelC13co.Width = 80;
1334 this.epiLabelC13co.Height = 20;
1335 this.epiLabelC13co.Text = "Company:";
1336 // epiTextBoxC7co
1337 this.epiTextBoxC7co.Top = 41;
1338 this.epiTextBoxC7co.Left = 604;
1339 this.epiTextBoxC7co.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1340 this.epiTextBoxC7co.Width = 167;
1341 this.epiTextBoxC7co.Height = 20;
1342 this.epiTextBoxC7co.Text = "";
1343 this.epiTextBoxC7co.EpiBinding = "OrderDtl.PerConCorpName_c";
1344 this.epiTextBoxC7co.EpiLabel = "epiLabelC13co";
1345 // erp.contracts.bo.custcnt.dll
1346 // epiGroupBoxC4
1347 this.epiGroupBoxC4.Top = 24;
1348 this.epiGroupBoxC4.Left = 826;
1349 this.epiGroupBoxC4.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1350 this.epiGroupBoxC4.Width = 307;
1351 this.epiGroupBoxC4.Height = 379;
1352 this.epiGroupBoxC4.Text = "Customer Comments";
1353 this.epiGroupBoxC4.Controls.Add(this.txtCustomerComments);
1354 this.epiGroupBoxC4.Controls.SetChildIndex(this.txtCustomerComments, 0);
1355 // txtCustomerComments
1356 this.txtCustomerComments.Top = 0;
1357 this.txtCustomerComments.Left = 0;
1358 this.txtCustomerComments.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1359 this.txtCustomerComments.Width = 0;
1360 this.txtCustomerComments.Height = 0;
1361 this.txtCustomerComments.Text = "";
1362 this.txtCustomerComments.EpiBinding = "OrderHed.CommentsFromCustomer_c";
1363 this.txtCustomerComments.EpiContextMenuKey = "";
1364 this.txtCustomerComments.Multiline = true;
1365 // baqComboC1
1366 this.baqComboC1.Top = 16;
1367 this.baqComboC1.Left = 36;
1368 this.baqComboC1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1369 this.baqComboC1.Width = 101;
1370 this.baqComboC1.Text = "";
1371 this.baqComboC1.EpiBinding = "OrderHed.OrderSite_c";
1372 this.baqComboC1.EpiLabel = "epiLabelC9";
1373 this.baqComboC1.DisplayMember = "Plant.Name";
1374 this.baqComboC1.DynamicQueryID = "CPEPlants";
1375 this.baqComboC1.ValueMember = "Plant.Plant";
1376 // btnRefreshContact
1377 this.btnRefreshContact.Top = 15;
1378 this.btnRefreshContact.Left = 604;
1379 this.btnRefreshContact.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1380 this.btnRefreshContact.Width = 168;
1381 this.btnRefreshContact.Height = 20;
1382 this.btnRefreshContact.Text = "Refresh Contact";
1383 // txtCustomerPONum
1384 this.txtCustomerPONum.Top = 15;
1385 this.txtCustomerPONum.Left = 319;
1386 this.txtCustomerPONum.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1387 this.txtCustomerPONum.Width = 89;
1388 this.txtCustomerPONum.Height = 20;
1389 this.txtCustomerPONum.Visible = false;
1390 this.txtCustomerPONum.Text = "";
1391 this.txtCustomerPONum.EpiBinding = "OrderHed.CustomerPONum_c";
1392 this.txtCustomerPONum.EpiLabel = "epiLabelC13";
1393 // lblCustomerPONum
1394 this.lblCustomerPONum.Top = 15;
1395 this.lblCustomerPONum.Left = 197;
1396 this.lblCustomerPONum.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1397 this.lblCustomerPONum.Width = 116;
1398 this.lblCustomerPONum.Height = 20;
1399 this.lblCustomerPONum.Visible = false;
1400 this.lblCustomerPONum.Text = "PEUS Cust PO:";
1401 // txtQuery
1402 this.txtQuery.Top = 53;
1403 this.txtQuery.Left = 866;
1404 this.txtQuery.Width = 416;
1405 this.txtQuery.Height = 413;
1406 this.txtQuery.Visible = false;
1407 this.txtQuery.Text = "****";
1408 this.txtQuery.Multiline = true;
1409 // epiGroupBoxC5
1410 this.epiGroupBoxC5.Top = 559;
1411 this.epiGroupBoxC5.Left = 10;
1412 this.epiGroupBoxC5.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1413 this.epiGroupBoxC5.Width = 795;
1414 this.epiGroupBoxC5.Height = 49;
1415 this.epiGroupBoxC5.Text = "Override PriceList";
1416 this.epiGroupBoxC5.Controls.Add(this.epiLabelC14);
1417 this.epiGroupBoxC5.Controls.Add(this.cmbHeaderPriceList);
1418 this.epiGroupBoxC5.Controls.SetChildIndex(this.epiLabelC14, 0);
1419 this.epiGroupBoxC5.Controls.SetChildIndex(this.cmbHeaderPriceList, 0);
1420 // epiLabelC14
1421 this.epiLabelC14.Top = 16;
1422 this.epiLabelC14.Left = 86;
1423 this.epiLabelC14.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1424 this.epiLabelC14.Width = 159;
1425 this.epiLabelC14.Height = 20;
1426 this.epiLabelC14.Text = "Set Price List on All Rows:";
1427 // cmbHeaderPriceList
1428 this.cmbHeaderPriceList.Top = 16;
1429 this.cmbHeaderPriceList.Left = 251;
1430 this.cmbHeaderPriceList.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1431 this.cmbHeaderPriceList.Width = 259;
1432 this.cmbHeaderPriceList.Text = "";
1433 this.cmbHeaderPriceList.EpiBinding = "OrderHed.HeaderPriceList_c";
1434 this.cmbHeaderPriceList.EpiLabel = "epiLabelC14";
1435 this.cmbHeaderPriceList.AutoWidth = false;
1436 this.cmbHeaderPriceList.AutoWidthOption = ((Ice.Lib.Framework.AutoWidthOptions)(1));
1437 // epiTextBoxC7
1438 this.epiTextBoxC7.Top = 40;
1439 this.epiTextBoxC7.Left = 390;
1440 this.epiTextBoxC7.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1441 this.epiTextBoxC7.Width = 111;
1442 this.epiTextBoxC7.Height = 23;
1443 this.epiTextBoxC7.Text = "epiTextBoxC7";
1444 this.epiTextBoxC7.EpiBinding = "OrderDtl.EmployeeNum_c";
1445 this.epiTextBoxC7.EpiLabel = "epiLabelC8";
1446 // txtCarrierAcctNo
1447 this.txtCarrierAcctNo.Top = 111;
1448 this.txtCarrierAcctNo.Left = 290;
1449 this.txtCarrierAcctNo.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1450 this.txtCarrierAcctNo.Width = 117;
1451 this.txtCarrierAcctNo.Height = 21;
1452 this.txtCarrierAcctNo.Text = "";
1453 this.txtCarrierAcctNo.EpiBinding = "OrderHed.CurrierAccountNum_c";
1454 // epiLabelSalesRepCode1
1455 this.epiLabelSalesRepCode1.Top = 136;
1456 this.epiLabelSalesRepCode1.Left = 207;
1457 this.epiLabelSalesRepCode1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1458 this.epiLabelSalesRepCode1.Width = 79;
1459 this.epiLabelSalesRepCode1.Height = 14;
1460 this.epiLabelSalesRepCode1.Text = "Sales Rep:";
1461 // epiTextBoxSalesRepCode1
1462 this.epiTextBoxSalesRepCode1.Top = 136;
1463 this.epiTextBoxSalesRepCode1.Left = 291;
1464 this.epiTextBoxSalesRepCode1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1465 this.epiTextBoxSalesRepCode1.Width = 117;
1466 this.epiTextBoxSalesRepCode1.Height = 19;
1467 this.epiTextBoxSalesRepCode1.Text = "";
1468 this.epiTextBoxSalesRepCode1.EpiBinding = "";
1469 this.epiTextBoxSalesRepCode1.EpiLabel = "epiLabelSalesRepCode1";
1470 this.epiTextBoxSalesRepCode1.ReadOnly = true;
1471 // lblReceivedDate
1472 this.lblReceivedDate.Top = 157;
1473 this.lblReceivedDate.Left = 3;
1474 this.lblReceivedDate.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1475 this.lblReceivedDate.Width = 97;
1476 this.lblReceivedDate.Height = 15;
1477 this.lblReceivedDate.Text = "Received Date:";
1478 // epiDateTimeEditorC2
1479 this.epiDateTimeEditorC2.Top = 157;
1480 this.epiDateTimeEditorC2.Left = 106;
1481 this.epiDateTimeEditorC2.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1482 this.epiDateTimeEditorC2.Width = 87;
1483 this.epiDateTimeEditorC2.EpiBinding = "OrderHed.ReceivedDate_c";
1484 this.epiDateTimeEditorC2.EpiLabel = "lblReceivedDate";
1485 // lblFitTech
1486 this.lblFitTech.Top = 163;
1487 this.lblFitTech.Left = 208;
1488 this.lblFitTech.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1489 this.lblFitTech.Width = 77;
1490 this.lblFitTech.Height = 9;
1491 this.lblFitTech.Text = "Fit Tech:";
1492 // cboFitTech
1493 this.cboFitTech.Top = 159;
1494 this.cboFitTech.Left = 291;
1495 this.cboFitTech.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1496 this.cboFitTech.Width = 117;
1497 this.cboFitTech.Text = "";
1498 this.cboFitTech.EpiBinding = "OrderHed.FitTechCode_c";
1499 this.cboFitTech.EpiLabel = "lblFitTech";
1500 this.cboFitTech.AutoWidth = false;
1501 this.cboFitTech.AutoWidthOption = ((Ice.Lib.Framework.AutoWidthOptions)(1));
1502 this.cboFitTech.DisplayMember = "Name";
1503 this.cboFitTech.EpiBOName = "Erp:BO:UserFile";
1504 this.cboFitTech.EpiColumns = new string[] {
1505 "Name"};
1506 this.cboFitTech.EpiSort = "Name";
1507 this.cboFitTech.EpiTableName = "UserFileList";
1508 this.cboFitTech.ValueMember = "DcdUserID";
1509 this.cboFitTech.EpiAltSearchMethod = "";
1510 // SalesOrderForm
1511 Ice.Lib.Framework.EpiBaseForm local17 = ((Ice.Lib.Framework.EpiBaseForm)(personalizeCustomizeManager.ControlsHT["2dcd1674-5e34-4d98-b493-c75747027376"]));
1512 local17.Top = 96;
1513 local17.Left = 224;
1514 local17.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1515 local17.Width = 1536;
1516 local17.Height = 803;
1517 local17.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1518 local17.Text = "Sales Order Entry";
1519 // lblJobType
1520 Ice.Lib.Framework.EpiLabel local18 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["12a90401-e916-4487-99be-3239e9af9335"]));
1521 local18.Top = 181;
1522 local18.Left = 580;
1523 // grpDetail3
1524 Ice.Lib.Framework.EpiGroupBox local19 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["4447f9c5-dd5e-4611-ac51-1ef9a95a98da"]));
1525 local19.Top = 583;
1526 local19.Left = 7;
1527 // lineListPanel1
1528 Ice.Lib.Framework.EpiBasePanel local20 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["7e4a739e-ffeb-40ae-a6a3-db0479295425"]));
1529 local20.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1530 local20.Width = 1457;
1531 local20.Height = 695;
1532 Ice.Lib.Framework.EpiUltraGrid local21 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["4dd0227a-9d85-4d3d-a876-6cf4ea34695b"]));
1533 local20.Controls.SetChildIndex(local21, 0);
1534 Infragistics.Win.UltraWinDock.DockableControlPane local22 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local20, "7e4a739e-ffeb-40ae-a6a3-db0479295425", nativeSheets);
1535 // lineCommissionsPanel1
1536 Ice.Lib.Framework.EpiBasePanel local23 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["6c823cb2-baf8-4d50-bbb1-052848f578a7"]));
1537 local23.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1538 local23.Width = 1449;
1539 local23.Height = 683;
1540 Infragistics.Win.UltraWinDock.DockableControlPane local24 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local23, "6c823cb2-baf8-4d50-bbb1-052848f578a7", nativeSheets);
1541 // summaryDetailPanel1
1542 Ice.Lib.Framework.EpiBasePanel local25 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["2c1407c1-7dd7-44d7-b306-a6020a279073"]));
1543 Ice.Lib.Framework.EpiUltraGrid local26 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["bec51417-b286-4d61-a471-3912bc098905"]));
1544 local25.Controls.SetChildIndex(local26, 0);
1545 Infragistics.Win.UltraWinDock.DockableControlPane local27 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local25, "2c1407c1-7dd7-44d7-b306-a6020a279073", nativeSheets);
1546 // grdSummaryOrderLines
1547 local26.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1548 // grpCounterSale
1549 Ice.Lib.Framework.EpiGroupBox local28 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["074dd791-284f-4df2-9165-f11af41dab21"]));
1550 local28.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1551 local28.Width = 148;
1552 local28.Height = 93;
1553 // releaseDetailPanel1
1554 Ice.Lib.Framework.EpiBasePanel local29 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["c8990e33-8c1f-4ae6-9976-e72e0f05e624"]));
1555 local29.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1556 local29.Width = 1449;
1557 local29.Height = 683;
1558 Infragistics.Win.UltraWinDock.DockableControlPane local30 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local29, "c8990e33-8c1f-4ae6-9976-e72e0f05e624", nativeSheets);
1559 // grpFrom
1560 Ice.Lib.Framework.EpiGroupBox local31 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["8a2c0fc1-a491-48f3-b8fb-a9d0a336158a"]));
1561 // lblPlant
1562 Ice.Lib.Framework.EpiLabel local32 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["628dba0a-a8e9-4f98-b493-bf27fa19a5db"]));
1563 local32.Top = 18;
1564 local32.Left = 6;
1565 local32.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1566 local32.Width = 114;
1567 local32.Height = 20;
1568 // lblRequestDate
1569 Ice.Lib.Framework.EpiLabel local33 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["fed57e91-8de4-4223-8f78-4ca23a37641e"]));
1570 local33.Top = 86;
1571 local33.Left = 4;
1572 local33.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1573 local33.Width = 96;
1574 local33.Height = 20;
1575 // lblRequestDate
1576 Ice.Lib.Framework.EpiLabel local34 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["c57493fd-cb1e-48e6-8d79-46a674a25a0f"]));
1577 local34.Top = 79;
1578 local34.Left = 0;
1579 local34.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1580 local34.Width = 92;
1581 local34.Height = 24;
1582 // btnPlanContract
1583 Ice.Lib.Framework.EpiButton local35 = ((Ice.Lib.Framework.EpiButton)(personalizeCustomizeManager.ControlsHT["dfa1f52e-76bd-4ce2-b7a7-2fec99d5d283"]));
1584 local35.Top = 263;
1585 local35.Left = 513;
1586 // txtContractID
1587 Ice.Lib.Framework.EpiTextBox local36 = ((Ice.Lib.Framework.EpiTextBox)(personalizeCustomizeManager.ControlsHT["591bd649-bd34-4178-9e05-94b8bef9d350"]));
1588 local36.Top = 277;
1589 local36.Left = 591;
1590 // lblLinkToContract
1591 Ice.Lib.Framework.EpiLabel local37 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["007a6ffd-d13f-4e29-8e58-730aef7efed8"]));
1592 local37.Top = 282;
1593 local37.Left = 563;
1594 // grpSoldTo
1595 Ice.Lib.Framework.EpiGroupBox local38 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["14b3c788-ec83-4bb0-8f68-bc8dde4773b9"]));
1596 // txtCustomerCustID
1597 Ice.Lib.Framework.EpiTextBox local39 = ((Ice.Lib.Framework.EpiTextBox)(personalizeCustomizeManager.ControlsHT["7ece91c9-dc93-4df4-9591-f6cad7562b71"]));
1598 local39.EpiBinding = "OrderHed.CustomerCustID";
1599 // lblAutoOrderBasedDisc
1600 Ice.Lib.Framework.EpiLabel local40 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["0b064d61-6bd2-4e60-aad8-f4456aca39ac"]));
1601 local40.Top = 66;
1602 local40.Left = 435;
1603 local40.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1604 local40.Width = 113;
1605 local40.Height = 25;
1606 local40.Text = "Apply Order Based Discounts Auto:";
1607 // lblPONum
1608 Ice.Lib.Framework.EpiLabel local41 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["a7a229f8-199f-46f6-9a38-14190da030e5"]));
1609 local41.Top = 14;
1610 local41.Left = 25;
1611 local41.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1612 local41.Width = 75;
1613 local41.Height = 20;
1614 // lblERSOrder
1615 Ice.Lib.Framework.EpiLabel local42 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["34e2a286-231b-442e-bae1-0d546288a1ab"]));
1616 local42.Top = 42;
1617 local42.Left = 469;
1618 local42.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1619 local42.Width = 80;
1620 local42.Height = 14;
1621 // chkERSORder
1622 Ice.Lib.Framework.EpiCheckBox local43 = ((Ice.Lib.Framework.EpiCheckBox)(personalizeCustomizeManager.ControlsHT["1fff7a5b-06fe-4268-9af8-1319da1dd662"]));
1623 local43.Top = 42;
1624 local43.Left = 555;
1625 // grdLineList
1626 local21.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1627 // lblOverridePriceList
1628 Ice.Lib.Framework.EpiLabel local44 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["bc019cdf-e8a6-4eb9-b16e-52a345748f10"]));
1629 local44.Top = 107;
1630 local44.Left = 21;
1631 local44.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1632 local44.Width = 164;
1633 local44.Height = 20;
1634 // lblDiscountPercent
1635 Ice.Lib.Framework.EpiLabel local45 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["742c5375-4ef6-4665-80f0-99bcb66b1dfb"]));
1636 local45.Text = "CarrierAcctNo";
1637 // nbrDiscountPercent
1638 Ice.Lib.Framework.EpiNumericEditor local46 = ((Ice.Lib.Framework.EpiNumericEditor)(personalizeCustomizeManager.ControlsHT["198ed247-d15b-48dd-b4d3-123938a8edd2"]));
1639 local46.ReadOnly = true;
1640 local46.Visible = false;
1641 local46.EpiBinding = "OrderHed.DiscountPercent";
1642 local46.Nullable = true;
1643 // lblInvcOrderCmp
1644 Ice.Lib.Framework.EpiLabel local47 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["2088d7c9-1d97-4f63-9a41-a8818228a253"]));
1645 local47.Top = 119;
1646 local47.Left = 450;
1647 local47.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1648 local47.Width = 85;
1649 local47.Height = 33;
1650 local47.Visible = false;
1651 // chkInvcOrderCmp
1652 Ice.Lib.Framework.EpiCheckBox local48 = ((Ice.Lib.Framework.EpiCheckBox)(personalizeCustomizeManager.ControlsHT["e9a8647d-5dfd-4c15-a166-b20927994c05"]));
1653 local48.Top = 140;
1654 local48.Left = 549;
1655 local48.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1656 local48.Width = 16;
1657 local48.Height = 17;
1658 // lblAutoPrint
1659 Ice.Lib.Framework.EpiLabel local49 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["cad82bd7-9ce2-407b-a5ed-844edfdefea6"]));
1660 local49.Top = 93;
1661 local49.Left = 446;
1662 local49.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1663 local49.Width = 102;
1664 local49.Height = 20;
1665 // ckbAutoOrderBasedDisc
1666 Ice.Lib.Framework.EpiCheckBox local50 = ((Ice.Lib.Framework.EpiCheckBox)(personalizeCustomizeManager.ControlsHT["d0f20109-36b9-4758-8c72-b82532c34806"]));
1667 local50.Top = 66;
1668 local50.Left = 554;
1669 // chkAutoPrint
1670 Ice.Lib.Framework.EpiCheckBox local51 = ((Ice.Lib.Framework.EpiCheckBox)(personalizeCustomizeManager.ControlsHT["561bce08-8e63-455a-a453-5b15ae05100e"]));
1671 local51.Top = 93;
1672 local51.Left = 554;
1673 // btnCounterSale
1674 local8.Top = 320;
1675 local8.Left = 428;
1676 local8.Width = 148;
1677 local8.Height = 22;
1678 // btnQuickJob
1679 local12.Top = 126;
1680 local12.Left = 913;
1681 local12.Visible = true;
1682 // hedSalesPersonPanel1
1683 Ice.Lib.Framework.EpiBasePanel local52 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["4fef8b01-7269-47eb-bee9-f8b637e8d7ce"]));
1684 local52.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1685 local52.Width = 1447;
1686 local52.Height = 634;
1687 Infragistics.Win.UltraWinDock.DockableControlPane local53 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local52, "4fef8b01-7269-47eb-bee9-f8b637e8d7ce", nativeSheets);
1688 // grpSummary
1689 Ice.Lib.Framework.EpiGroupBox local54 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["a003549e-312f-4364-9b9e-660b25e6e358"]));
1690 // currTotalCharges
1691 Ice.Lib.Framework.EpiCurrencyConver local55 = ((Ice.Lib.Framework.EpiCurrencyConver)(personalizeCustomizeManager.ControlsHT["39322272-56fb-4764-8038-29c1c044f213"]));
1692 local55.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1693 local55.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1694 local55.Width = 140;
1695 local55.Height = 21;
1696 // currTotalMiscellaneous
1697 Ice.Lib.Framework.EpiCurrencyConver local56 = ((Ice.Lib.Framework.EpiCurrencyConver)(personalizeCustomizeManager.ControlsHT["353891e4-5199-4cf3-b956-00c56e99ec19"]));
1698 local56.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1699 local56.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1700 local56.Width = 140;
1701 local56.Height = 21;
1702 // curTotalTax
1703 Ice.Lib.Framework.EpiCurrencyConver local57 = ((Ice.Lib.Framework.EpiCurrencyConver)(personalizeCustomizeManager.ControlsHT["ac863e2a-9dc1-49e1-b20d-d7600ffc47b8"]));
1704 local57.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1705 local57.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1706 local57.Width = 140;
1707 local57.Height = 21;
1708 // currRounding
1709 Ice.Lib.Framework.EpiCurrencyConver local58 = ((Ice.Lib.Framework.EpiCurrencyConver)(personalizeCustomizeManager.ControlsHT["95835344-cff5-4e35-ac3b-c13cd769ccb0"]));
1710 local58.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1711 local58.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1712 local58.Width = 140;
1713 local58.Height = 21;
1714 // currTotalOrder
1715 Ice.Lib.Framework.EpiCurrencyConver local59 = ((Ice.Lib.Framework.EpiCurrencyConver)(personalizeCustomizeManager.ControlsHT["c7457526-103e-4f8a-a194-c08416968354"]));
1716 local59.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1717 local59.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1718 local59.Width = 140;
1719 local59.Height = 21;
1720 // currTotalDiscount
1721 Ice.Lib.Framework.EpiCurrencyConver local60 = ((Ice.Lib.Framework.EpiCurrencyConver)(personalizeCustomizeManager.ControlsHT["d5fdc384-6237-4e89-8a4a-7a5ce57ba39f"]));
1722 local60.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
1723 local60.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1724 local60.Width = 80;
1725 local60.Height = 21;
1726 local60.Visible = false;
1727 // lblTotalDiscount
1728 Ice.Lib.Framework.EpiLabel local61 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["05f95d1e-1461-4cc3-bd7f-c7389beaa698"]));
1729 local61.Top = 39;
1730 local61.Left = 1;
1731 local61.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1732 local61.Width = 96;
1733 local61.Height = 20;
1734 local61.Visible = false;
1735 // numTotalDiscount
1736 Ice.Lib.Framework.EpiNumericEditor local62 = ((Ice.Lib.Framework.EpiNumericEditor)(personalizeCustomizeManager.ControlsHT["7e987bef-a0a9-48d6-ab46-4854be02a595"]));
1737 local62.Top = 39;
1738 local62.Left = 103;
1739 local62.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1740 local62.Width = 39;
1741 local62.Visible = false;
1742 local62.Nullable = true;
1743 // lblPercentage
1744 Ice.Lib.Framework.EpiLabel local63 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["c16f33b9-c010-4694-9253-f115cbc793f9"]));
1745 local63.Top = 39;
1746 local63.Left = 135;
1747 local63.Visible = false;
1748 // lblReadyToCalc
1749 local10.Top = 1;
1750 local10.Left = 200;
1751 local10.Width = 145;
1752 local10.Height = 20;
1753 // chkReadyToCalc
1754 // grpShipTo
1755 Ice.Lib.Framework.EpiGroupBox local64 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["623033c5-a5c0-4b24-bdc6-362470a0ac41"]));
1756 // lblShipToAddr
1757 Ice.Lib.Framework.EpiLabel local65 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["a724efda-a8b9-4708-be55-d904c914504c"]));
1758 local65.Top = 63;
1759 local65.Left = 48;
1760 local65.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
1761 local65.Width = 64;
1762 local65.Height = 20;
1763 // Finishing control initialization.
1764 topControl.FindForm().ResumeLayout();
1765 }
1766
1767 public void DestroyGlobalVariables()
1768 {
1769 this.epiLabelC1 = null;
1770 this.epiLabelC1_e3a135f9_5a5d_4acc_bdfa_903304760694 = null;
1771 this.epiLabelC2 = null;
1772 this.epiLabelC2_0ea5aad9_e947_423b_8fdc_9354006db4ff = null;
1773 this.epiLabel1 = null;
1774 this.epiLabel1_cff20c3e_2165_403f_9df6_10ecb182ecf3 = null;
1775 this.epiTextBoxC1 = null;
1776 this.epiTextBoxC1_d7452973_f266_4fb1_9f50_86176582bf24 = null;
1777 this.epiTextBoxC2 = null;
1778 this.epiTextBoxC2_176cff2f_225a_4610_94ef_000a2864cda0 = null;
1779 this.epiTextBoxC3 = null;
1780 this.epiTextBoxC3_99151df7_883c_4c1c_b485_d883b5081423 = null;
1781 this.epiGroupBoxC1 = null;
1782 this.epiGroupBoxC1_861c7222_896e_4323_89fa_dd2fc20e089d = null;
1783 this.empBasicComboC1 = null;
1784 this.empBasicComboC1_ac1ee53e_0b23_47f6_9769_6095c17c2044 = null;
1785 this.epiLabelC3 = null;
1786 this.epiLabelC3_99a98a01_c3ac_4fb5_8cea_fadec62a48d3 = null;
1787 this.btnSelectContact = null;
1788 this.btnSelectContact_083f1035_9ee3_4f28_a49b_e649a4b1ef07 = null;
1789 this.epiNumericEditorC1 = null;
1790 this.epiNumericEditorC1_ca7ed2c7_7441_4b16_993a_3e759df6558f = null;
1791 this.cmvPerConName = null;
1792 this.cmvPerConName_75b07942_9780_420a_9470_9f5d3b854bc1 = null;
1793 this.epiLabelC4 = null;
1794 this.epiLabelC4_0ba376e5_5be4_4241_9e59_ff6a202943c8 = null;
1795 this.cmbContactDOB = null;
1796 this.cmbContactDOB_15183d62_19c7_4a21_89fc_041569bddd1d = null;
1797 this.epiGroupBoxC2 = null;
1798 this.epiGroupBoxC2_d46d8466_975c_47d9_afd6_a3d209400a9c = null;
1799 this.epiLabelC5 = null;
1800 this.epiLabelC5_865e5065_22b0_400c_b0a4_aac02471dba6 = null;
1801 this.txtFirstName = null;
1802 this.txtFirstName_2be92edc_ff56_4b31_a15a_46e25fe59ed4 = null;
1803 this.epiLabelC6 = null;
1804 this.epiLabelC6_c8d16e2d_2cac_4ac8_899c_b51966821ec2 = null;
1805 this.epiLabelC7 = null;
1806 this.epiLabelC7_04b8564e_4197_41c2_906d_011c9b81350e = null;
1807 this.epiDateTimeEditorC1 = null;
1808 this.epiDateTimeEditorC1_d2a94790_bb2c_42df_a5a1_8e7a967e5e89 = null;
1809 this.btnCreateNewContact = null;
1810 this.btnCreateNewContact_78a10f50_af7a_44ef_9078_bc8a81137437 = null;
1811 this.epiTextBoxC4 = null;
1812 this.epiTextBoxC4_f14878e2_0e8d_403d_bd68_c354cfad6c54 = null;
1813 this.epiLabelC8 = null;
1814 this.epiLabelC8_b3ffbad4_d2a9_4122_b9a7_a6836107d70b = null;
1815 this.cmbEmployeeNum = null;
1816 this.cmbEmployeeNum_5dda1115_e352_4546_92de_bad715e5ea32 = null;
1817 this.epiLabelC1aa = null;
1818 this.epiLabelC1aa_93eb9282_d276_46dc_919c_83178d357010 = null;
1819 this.txtEmpNum = null;
1820 this.txtEmpNum_2332ab42_e00b_4339_960b_da0a8d8c6bec = null;
1821 this.Sheet1 = null;
1822 this.Sheet1_adbc0ab4_b441_46d9_ae92_b32960a53d07 = null;
1823 this.Sheet2 = null;
1824 this.Sheet2_7f5c5a31_d34c_412b_993d_8866b44f278b = null;
1825 this.Sheet3 = null;
1826 this.Sheet3_eaab0101_2d15_4678_921f_525edb65bf89 = null;
1827 this.grdDtlList = null;
1828 this.grdDtlList_71fd4fbb_38d8_4207_9712_0d8022341a17 = null;
1829 this.epiGroupBoxC3 = null;
1830 this.epiGroupBoxC3_cc88c880_a173_4547_bcc4_dc99c2a5aa86 = null;
1831 this.epiLabelC9 = null;
1832 this.epiLabelC9_2b32ec55_7087_4c0d_98a5_6dc5e01697f5 = null;
1833 this.epiLabelC10 = null;
1834 this.epiLabelC10_edfe3fa7_3d56_4630_a12e_5106ae6b95cf = null;
1835 this.cmbSearchType = null;
1836 this.cmbSearchType_d8a0cba0_fd0f_4655_b18e_6bc972dbe676 = null;
1837 this.epiLabelC11 = null;
1838 this.epiLabelC11_47617eef_27d0_44e7_bd5d_db99aaf795ce = null;
1839 this.epiTextBoxC5 = null;
1840 this.epiTextBoxC5_7fe56970_1ebf_4709_bb41_4ce0005dd485 = null;
1841 this.epiLabelC12 = null;
1842 this.epiLabelC12_a4c9459a_23f7_400a_80ac_d1ea51010626 = null;
1843 this.epiTextBoxC6 = null;
1844 this.epiTextBoxC6_96805b1c_337a_4eb5_b5cc_c08569d9ff7a = null;
1845 this.epiLabelC1comp = null;
1846 this.epiLabelC1comp_c32e2c43_2eda_4200_a86a_b7a364ae5070 = null;
1847 this.txtCorpName = null;
1848 this.txtCorpName_70602aa3_216f_4b49_bc86_f28916a00838 = null;
1849 this.epiLabelC13co = null;
1850 this.epiLabelC13co_a4790422_9982_4dc1_b067_ce54e766c1ca = null;
1851 this.epiTextBoxC7co = null;
1852 this.epiTextBoxC7co_b83d2486_c5a9_43c8_803b_8888683e7ee8 = null;
1853 this.epiGroupBoxC4 = null;
1854 this.epiGroupBoxC4_7f0f2080_5d48_4965_b198_b5abd21808ad = null;
1855 this.txtCustomerComments = null;
1856 this.txtCustomerComments_6f8f35a4_951a_4321_b607_409fdf473674 = null;
1857 this.baqComboC1 = null;
1858 this.baqComboC1_dbb6f21e_c202_4481_aecf_ec708f1c5cfc = null;
1859 this.btnRefreshContact = null;
1860 this.btnRefreshContact_e04e7880_2ecf_4f63_8982_39f691360c87 = null;
1861 this.txtCustomerPONum = null;
1862 this.txtCustomerPONum_687a17ed_1050_44f3_9aac_ae9c910aab0c = null;
1863 this.lblCustomerPONum = null;
1864 this.lblCustomerPONum_cfb06a0e_5891_4251_b9e6_6d73c38575bc = null;
1865 this.txtQuery = null;
1866 this.txtQuery_ff235923_b42a_41db_8183_05600a8a5e79 = null;
1867 this.epiGroupBoxC5 = null;
1868 this.epiGroupBoxC5_9b0aa4db_799b_4a8a_af54_f294666dfd04 = null;
1869 this.epiLabelC14 = null;
1870 this.epiLabelC14_cd4d20fa_be1f_426e_958d_425ac53e7084 = null;
1871 this.cmbHeaderPriceList = null;
1872 this.cmbHeaderPriceList_0efb8c61_d74c_46de_94f7_a33195f3a038 = null;
1873 this.epiTextBoxC7 = null;
1874 this.epiTextBoxC7_8361b0ff_09a4_4566_9a1d_1f895ae3d87e = null;
1875 this.txtCarrierAcctNo = null;
1876 this.txtCarrierAcctNo_6247443d_220c_4d04_a078_5769c79aafcf = null;
1877 this.epiLabelSalesRepCode1 = null;
1878 this.epiLabelSalesRepCode1_9db1e8fe_4bec_4711_9ddd_a5d404e5ce49 = null;
1879 this.epiTextBoxSalesRepCode1 = null;
1880 this.epiTextBoxSalesRepCode1_921c33db_2c1a_441f_8767_e80bffdfadde = null;
1881 this.lblReceivedDate = null;
1882 this.lblReceivedDate_d2bbe9d8_5c71_4e15_8185_b34234d2ff45 = null;
1883 this.epiDateTimeEditorC2 = null;
1884 this.epiDateTimeEditorC2_7e27ea24_2dcf_4418_b394_c35b9a76bd7b = null;
1885 this.lblFitTech = null;
1886 this.lblFitTech_56fbc65b_0811_403b_be99_f2d2b6901306 = null;
1887 this.cboFitTech = null;
1888 this.cboFitTech_57525ffd_72f8_4949_90b1_8b0fb4aaa065 = null;
1889 this.csm = null;
1890 this.oTrans = null;
1891 this.SalesOrderForm = null;
1892 this.baseToolbarsManager = null;
1893 this.OrderRel_Column = null;
1894 this.OrderRelTree_Row = null;
1895 this.OrderMsc_Column = null;
1896 this.OrderMsc_Row = null;
1897 this.QuoteDtlAttch_Column = null;
1898 this.AutoAttachQuoteDtl_Row = null;
1899 this.QuoteHedList_Column = null;
1900 this.QuoteHedList_Row = null;
1901 this.OrderHed_Column = null;
1902 this.OrderHed_Row = null;
1903 this.BookDtl_Column = null;
1904 this.BookDtl_Row = null;
1905 this.SerialNumberSearch_Column = null;
1906 this.SNS_Row = null;
1907 this.SaveOTSParams_Column = null;
1908 this.SaveOTS_Row = null;
1909 this.OrderHedList_Column = null;
1910 this.OrderHedList_Row = null;
1911 this.BpmData_Column = null;
1912 this.CallContextBpmData_Row = null;
1913 this.ccTable_Column = null;
1914 this.CreditTran2_Row = null;
1915 this.SalesKitPartInfo_Column = null;
1916 this.KitPartInfo_Row = null;
1917 this.OrderRel_Row = null;
1918 this.OrderDtlAttch_Column = null;
1919 this.AutoAttachOrderDtl_Row = null;
1920 this.AutoAttachSalesKits_Row = null;
1921 this.QuoteDtl_Column = null;
1922 this.QuoteDtl_Row = null;
1923 this.TaxConnectStatus_Column = null;
1924 this.TaxConnectStatus_Row = null;
1925 this.OrderRelTax_Column = null;
1926 this.OrdRelTax_Row = null;
1927 this._Column = null;
1928 this.NoBoundField_Row = null;
1929 this.OrderDtl_Column = null;
1930 this.SalesKits_Row = null;
1931 this.OHOrderMsc_Column = null;
1932 this.OHOrderMsc_Row = null;
1933 this.Client_Column = null;
1934 this.CallContextClientData_Row = null;
1935 this.OrderDtlTree_Row = null;
1936 this.OrderHedUPS_Column = null;
1937 this.OrderHedUPS_Row = null;
1938 this.OrderDtl_Row = null;
1939 this.OrderRepComm_Column = null;
1940 this.OrderRepComm_Row = null;
1941 this.CreditTran_Column = null;
1942 this.CreditTran_Row = null;
1943 this.CopyNew_Row = null;
1944 this.HedTaxSum_Column = null;
1945 this.HedTaxSum_Row = null;
1946 this.JobProd_Column = null;
1947 this.JobProd_Row = null;
1948 this.OrderSched_Column = null;
1949 this.OrderSched_Row = null;
1950 this.QuoteQty_Column = null;
1951 this.QuoteQty_Row = null;
1952 this.PartSubs_Column = null;
1953 this.AlternatePart_Row = null;
1954 this.AutoAttachOrderDtlTree_Row = null;
1955 this.OrderHedAttch_Column = null;
1956 this.AutoAttachOrderHed_Row = null;
1957 this.QuoteHedAttch_Column = null;
1958 this.AutoAttachQuoteHed_Row = null;
1959 this.QuoteHed_Column = null;
1960 this.QuoteHed_Row = null;
1961 }
1962
1963 public static string[] GetTranslatableStrings()
1964 {
1965 return new string[] {
1966 "Cast:",
1967 "Left Mould:",
1968 "Right Mould:",
1969 "",
1970 "Contacts",
1971 "Employee:",
1972 "Person / Contact...",
1973 "DOB:",
1974 "New Contact",
1975 "First Name:",
1976 "Last Name:",
1977 "Create Contact and Select",
1978 "Employee Num:",
1979 "Emp Num:",
1980 "Order Line Entry",
1981 "List",
1982 "Detail",
1983 "Manufacture Site",
1984 "Site:",
1985 "Contact Search Type:",
1986 "Opportunity #:",
1987 "Company:",
1988 "Customer Comments",
1989 "Refresh Contact",
1990 "PEUS Cust PO:",
1991 "****",
1992 "Override PriceList",
1993 "Set Price List on All Rows:",
1994 "epiTextBoxC7",
1995 "Sales Rep:",
1996 "Received Date:",
1997 "Fit Tech:",
1998 "Sales Order Entry",
1999 "Apply Order Based Discounts Auto:",
2000 "CarrierAcctNo"};
2001 }
2002
2003 public static string GetStringByID(string id)
2004 {
2005 return "";
2006 }
2007 //6.4 Add White Diamond and Pink Glitter as colors
2008//6.3 - Changing 10103R/N colors and filters to match 10008N/R
2009//6.2 - PO Required work
2010// 6.1 - Shrunk Summary fields on main page
2011// 6.0 - Ensuring all MessageBox.Show give verbose Messages
2012
2013// 5.9 - moved FitTech box and label Drop
2014// - If partnum changes, verify that the selected colour and filters are valid. If not, clear the value and notify the user.
2015// - PEU PO Num changed label to PEUS and make it disappear unless company = 200 and customer = 250
2016
2017// _OrderEntry_5.8 - Fixing Person Contact Update not refreshing properly
2018
2019 // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
2020 // Begin Wizard Added Module Level Variables **
2021
2022 private EpiDataView edvOrderDtl;
2023 private EpiBaseAdapter oTrans_ordAdapter;
2024 private EpiDataView edvOrderRel;
2025 private EpiDataView edvOrderHed;
2026 // End Wizard Added Module Level Variables **
2027 private System.Collections.Hashtable m_hashCopyColumns;
2028 // Add Custom Module Level Variables Here **
2029 private DataTable m_dtDropDownTable;
2030 private bool m_copying;
2031 private ContactSearch m_ContactSearch;
2032 private ContactSearch m_CastSearch;
2033 private DataTable m_dtSalesUM;
2034 private string m_custID;
2035 private int m_custNum;
2036 private string m_version;
2037 private string m_shipToNum;
2038 private string m_targetCompany;
2039 private string m_sysConfigFile;
2040 private string m_userName;
2041 private string m_passWord;
2042 private Ice.Core.Session m_targetSession;
2043
2044 public void InitializeCustomCode()
2045 {
2046 // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
2047 // Begin Wizard Added Variable Initialization
2048
2049 this.edvOrderDtl = ((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"]));
2050 this.edvOrderDtl.EpiViewNotification += new EpiViewNotification(this.edvOrderDtl_EpiViewNotification);
2051 this.OrderDtl_Column.ColumnChanged += new DataColumnChangeEventHandler(this.OrderDtl_AfterFieldChange);
2052 this.OrderDtl_Column.ColumnChanging += new DataColumnChangeEventHandler(this.OrderDtl_BeforeFieldChange);
2053 this.oTrans_ordAdapter = ((EpiBaseAdapter)(this.csm.TransAdaptersHT["oTrans_ordAdapter"]));
2054 this.oTrans_ordAdapter.BeforeAdapterMethod += new BeforeAdapterMethod(this.oTrans_ordAdapter_BeforeAdapterMethod);
2055 this.OrderHed_Column.ColumnChanged += new DataColumnChangeEventHandler(this.OrderHed_AfterFieldChange);
2056 this.edvOrderRel = ((EpiDataView)(this.oTrans.EpiDataViews["OrderRel"]));
2057 this.edvOrderRel.EpiViewNotification += new EpiViewNotification(this.edvOrderRel_EpiViewNotification);
2058 this.OrderHed_Column.ColumnChanging += new DataColumnChangeEventHandler(this.OrderHed_BeforeFieldChange);
2059 this.edvOrderHed = ((EpiDataView)(this.oTrans.EpiDataViews["OrderHed"]));
2060 this.edvOrderHed.EpiViewNotification += new EpiViewNotification(this.edvOrderHed_EpiViewNotification);
2061 this.oTrans_ordAdapter.AfterAdapterMethod += new AfterAdapterMethod(this.oTrans_ordAdapter_AfterAdapterMethod);
2062 // End Wizard Added Variable Initialization
2063 m_custID = "";
2064 m_version = "6.4";
2065 // Begin Wizard Added Custom Method Calls
2066
2067 this.btnSelectContact.Click += new System.EventHandler(this.btnSelectContact_Click);
2068 this.btnCreateNewContact.Click += new System.EventHandler(this.btnCreateNewContact_Click);
2069 SetExtendedProperties();
2070 this.epiNumericEditorC1.Leave += new System.EventHandler(this.epiNumericEditorC1_Leave);
2071 this.grdDtlList.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.grdDtlList_BeforeRowInsert);
2072 this.grdDtlList.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.grdDtlList_ClickCellButton);
2073 this.grdDtlList.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.grdDtlList_CellChange);
2074 this.grdDtlList.BeforeCellListDropDown += new Infragistics.Win.UltraWinGrid.CancelableCellEventHandler(this.grdDtlList_BeforeCellListDropDown);
2075 this.cmbSearchType.ValueChanged += new System.EventHandler(this.cmbSearchType_ValueChanged);
2076 this.btnRefreshContact.Click += new System.EventHandler(this.btnRefreshContact_Click);
2077 // End Wizard Added Custom Method Calls
2078
2079
2080 m_copying = false;
2081 m_custNum = 0;
2082 m_shipToNum = "";
2083
2084 m_targetCompany = "200";
2085
2086 //ENV
2087 //m_sysConfigFile = @"\\cpe-erp\ERP10.1.600.0Deployment\Client\Config\erp1016production.sysconfig";
2088 m_sysConfigFile = @"\\cpe-erp\ERP10.1.600.0Deployment\Client\Config\erp1016crp.sysconfig";
2089
2090 m_userName = "CANADAONLY";
2091 m_passWord = "Epicor";
2092 m_targetSession = null;
2093 m_targetSession = new Ice.Core.Session(m_userName, m_passWord, Ice.Core.Session.LicenseType.EnterpriseProcessing, m_sysConfigFile);
2094 }
2095
2096 public void DestroyCustomCode()
2097 {
2098 // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
2099 // Begin Wizard Added Object Disposal
2100
2101 this.btnSelectContact.Click -= new System.EventHandler(this.btnSelectContact_Click);
2102 this.btnCreateNewContact.Click -= new System.EventHandler(this.btnCreateNewContact_Click);
2103 this.edvOrderDtl.EpiViewNotification -= new EpiViewNotification(this.edvOrderDtl_EpiViewNotification);
2104 this.edvOrderDtl = null;
2105 this.OrderDtl_Column.ColumnChanged -= new DataColumnChangeEventHandler(this.OrderDtl_AfterFieldChange);
2106 this.epiNumericEditorC1.Leave -= new System.EventHandler(this.epiNumericEditorC1_Leave);
2107 this.OrderDtl_Column.ColumnChanging -= new DataColumnChangeEventHandler(this.OrderDtl_BeforeFieldChange);
2108 this.grdDtlList.BeforeRowInsert -= new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.grdDtlList_BeforeRowInsert);
2109 this.oTrans_ordAdapter.BeforeAdapterMethod -= new BeforeAdapterMethod(this.oTrans_ordAdapter_BeforeAdapterMethod);
2110 this.oTrans_ordAdapter = null;
2111 this.grdDtlList.ClickCellButton -= new Infragistics.Win.UltraWinGrid.CellEventHandler(this.grdDtlList_ClickCellButton);
2112 this.grdDtlList.CellChange -= new Infragistics.Win.UltraWinGrid.CellEventHandler(this.grdDtlList_CellChange);
2113 this.grdDtlList.BeforeCellListDropDown -= new Infragistics.Win.UltraWinGrid.CancelableCellEventHandler(this.grdDtlList_BeforeCellListDropDown);
2114 this.OrderHed_Column.ColumnChanged -= new DataColumnChangeEventHandler(this.OrderHed_AfterFieldChange);
2115 this.edvOrderRel.EpiViewNotification -= new EpiViewNotification(this.edvOrderRel_EpiViewNotification);
2116 this.edvOrderRel = null;
2117 this.OrderHed_Column.ColumnChanging -= new DataColumnChangeEventHandler(this.OrderHed_BeforeFieldChange);
2118 this.cmbSearchType.ValueChanged -= new System.EventHandler(this.cmbSearchType_ValueChanged);
2119 this.edvOrderHed.EpiViewNotification -= new EpiViewNotification(this.edvOrderHed_EpiViewNotification);
2120 this.edvOrderHed = null;
2121 this.oTrans_ordAdapter.AfterAdapterMethod -= new AfterAdapterMethod(this.oTrans_ordAdapter_AfterAdapterMethod);
2122 this.btnRefreshContact.Click -= new System.EventHandler(this.btnRefreshContact_Click);
2123 // End Wizard Added Object Disposal
2124
2125 // Begin Custom Code Disposal
2126 new Thread(() =>
2127 {
2128 Thread.CurrentThread.IsBackground = true;
2129 /* run your code here */
2130 Thread.Sleep(3000);
2131 if ( m_targetSession != null )
2132 {
2133 m_targetSession.Dispose();
2134 m_targetSession = null;
2135 }
2136 }).Start();
2137 // End Custom Code Disposal
2138 }
2139
2140 private void btnSelectContact_Click(object sender, System.EventArgs args)
2141 {
2142//MessageBox.Show("btnSelectContact_Click");
2143 string select = " select PerConID as PerConID, FirstName, LastName, DOB_c as DOB, EmployeeNum_c as EmployeeNum, CorpName as Company, Comment," +
2144 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
2145 " '1' " +
2146 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
2147 " '3' " +
2148 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
2149 " '5' " +
2150 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
2151 " '7' " +
2152 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
2153 " '9' " +
2154 " else " +
2155 " '' " +
2156 " end as RightMould, " +
2157 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
2158 " '2' " +
2159 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
2160 " '4' " +
2161 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
2162 " '6' " +
2163 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
2164 " '8' " +
2165 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
2166 " '10' " +
2167 " else " +
2168 " '' " +
2169 " end as LeftMould, " +
2170" case when plo.percon_1_2_c = dbo.percon.PerConID then " +
2171 " plo.lotnum + '1-2' " +
2172 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
2173 " plo.lotnum + '3-4' " +
2174 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
2175 " plo.lotnum + '5-6' " +
2176 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
2177 " plo.lotnum + '7-8' " +
2178 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
2179 " plo.lotnum + '9-10' " +
2180 " else " +
2181 " '' " +
2182 " end as SerialNo" +
2183 " , case when plo.percon_1_2_c = dbo.percon.PerConID then " +
2184" plo.PerCon_1_2_Notes_c " +
2185" when plo.percon_3_4_c = dbo.percon.PerConID then " +
2186" plo.PerCon_3_4_Notes_c " +
2187" when plo.percon_5_6_c = dbo.percon.PerConID then " +
2188" plo.PerCon_5_6_Notes_c " +
2189" when plo.percon_7_8_c = dbo.percon.PerConID then " +
2190" plo.PerCon_7_8_Notes_c " +
2191" when plo.percon_9_10_c = dbo.percon.PerConID then " +
2192" plo.PerCon_9_10_Notes_c " +
2193" else " +
2194" '' " +
2195" end " +
2196 " as Notes, " +
2197
2198 " plo.ExpirationDate as ExpirationDate, " +
2199 " plo.lotnum as ExistingCast " +
2200" from dbo.percon with (nolock) " +
2201" left outer join dbo.partlot as plo on plo.company = dbo.percon.company and plo.ExpirationDate > GetDate() and ( plo.percon_1_2_c = PerConID or plo.percon_3_4_c = PerConID or plo.percon_5_6_c = PerConID or plo.percon_7_8_c = PerConID or plo.percon_9_10_c = PerConID) " +
2202 " where dbo.percon.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' order by dbo.percon.perconid, ExistingCast ";
2203
2204 if ( ((Ice.Core.Session)oTrans.Session).CompanyID != "200" )
2205 {
2206
2207
2208 select = " select pc.PerConID as PerConID, pc.FirstName, pc.LastName, pc.DOB_c as DOB, pc.EmployeeNum_c as EmployeeNum, pc.Comment, pc.CorpName as Company, " +
2209
2210 " case when pl.percon_1_2_c = gpc.PerConID then " +
2211" '1' " +
2212" when pl.percon_3_4_c = gpc.PerConID then " +
2213" '3' " +
2214" when pl.percon_5_6_c = gpc.PerConID then " +
2215" '5' " +
2216" when pl.percon_7_8_c = gpc.PerConID then " +
2217" '7' " +
2218" when pl.percon_9_10_c = gpc.PerConID then " +
2219" '9' " +
2220" else " +
2221" '' " +
2222" end as RightMould, " +
2223 " case when pl.percon_1_2_c = gpc.PerConID then " +
2224" '2' " +
2225" when pl.percon_3_4_c = gpc.PerConID then " +
2226" '4' " +
2227" when pl.percon_5_6_c = gpc.PerConID then " +
2228" '6' " +
2229" when pl.percon_7_8_c = gpc.PerConID then " +
2230" '8' " +
2231" when pl.percon_9_10_c = gpc.PerConID then " +
2232" '10' " +
2233" else " +
2234" '' " +
2235" end as LeftMould, " +
2236" case when pl.percon_1_2_c = gpc.PerConID then " +
2237" pl.lotnum + '1-2' " +
2238" when pl.percon_3_4_c = gpc.PerConID then " +
2239" pl.lotnum + '3-4' " +
2240" when pl.percon_5_6_c = gpc.PerConID then " +
2241" pl.lotnum + '5-6' " +
2242" when pl.percon_7_8_c = gpc.PerConID then " +
2243" pl.lotnum + '7-8' " +
2244" when pl.percon_9_10_c = gpc.PerConID then " +
2245" pl.lotnum + '9-10' " +
2246" else " +
2247" '' " +
2248" end as SerialNo, " +
2249" case when pl.percon_1_2_c = gpc.PerConID then " +
2250" pl.PerCon_1_2_Notes_c " +
2251" when pl.percon_3_4_c = gpc.PerConID then " +
2252" pl.PerCon_3_4_Notes_c " +
2253" when pl.percon_5_6_c = gpc.PerConID then " +
2254" pl.PerCon_5_6_Notes_c " +
2255" when pl.percon_7_8_c = gpc.PerConID then " +
2256" pl.PerCon_7_8_Notes_c " +
2257" when pl.percon_9_10_c = gpc.PerConID then " +
2258" pl.PerCon_9_10_Notes_c " +
2259" else " +
2260" '' " +
2261" end as Notes , " +
2262 " pl.ExpirationDate as ExpirationDate, " +
2263 " pl.lotnum as ExistingCast " +
2264" from dbo.percon as pc with (nolock) " +
2265" join erp.glbpercon as gpc on '200' = gpc.company and gpc.GlbCompany = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and gpc.glbperconid = pc.perconid " +
2266" left outer join dbo.PartLot as pl with (nolock)on pl.company = gpc.company and ( pl.percon_1_2_c = gpc.PerConID or " +
2267" pl.percon_3_4_c = gpc.PerConID or pl.percon_5_6_c = gpc.PerConID or pl.percon_7_8_c = gpc.PerConID or pl.percon_9_10_c = gpc.PerConID) " +
2268" where pc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' order by pc.perconid, pl.lotnum";
2269 }
2270 //MessageBox.Show("262");
2271 txtQuery.Text += "262***********************************************262\n\n" + select;
2272 LaunchSearch(select);
2273 }
2274
2275 private void btnCreateNewContact_Click(object sender, System.EventArgs args)
2276 {
2277 if ( CheckContactExists(txtFirstName.Text.Trim(), epiTextBoxC4.Text.Trim(), epiDateTimeEditorC1.Value, Convert.ToInt32(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustNum"])) == false )
2278 {
2279 CreateNewContact(txtFirstName.Text.Trim(), epiTextBoxC4.Text.Trim(), epiDateTimeEditorC1.Value, txtEmpNum.Text, Convert.ToString(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustomerName"]), Convert.ToInt32(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustNum"]) );
2280 }
2281 else
2282 {
2283 txtFirstName.Text = "";
2284 epiTextBoxC4.Text = "";
2285 epiDateTimeEditorC1.Value = null;
2286 }
2287 }
2288
2289 private bool CheckContactExists(string FirstName, string LastName, object dboValue, int custNum)
2290 {
2291 bool useExistingContact = false;
2292 try
2293 {
2294 DateTime dob = new DateTime(1900,01,01);
2295 try
2296 {
2297 dob = Convert.ToDateTime(dboValue);
2298 }catch{}
2299 string filter = "firstname = '" + FirstName + "' and lastname = '" + LastName + "' and DOB_c = '" + dob.ToString("yyyy-MM-dd") + "'";
2300 bool recSelected;
2301 DataSet ds = SearchFunctions.listLookup(oTrans,"PerConAdapter", out recSelected, false, filter, true);
2302 if ( recSelected )
2303 {
2304 DataSet dsBO = BOReaderData("PerCon", "PerConID = " + ds.Tables[0].Rows[0]["PerConID"].ToString(), "EmployeeNum_c");
2305 string empNum = "";
2306 if ( dsBO.Tables[0].Rows.Count > 0 )
2307 {
2308 empNum = dsBO.Tables[0].Rows[0]["EmployeeNum_c"].ToString();
2309
2310 }
2311 //MessageBox.Show("168: Contact Exists where FirstName, LastName and DOB match.\nOn the next dialog box click search and select an existing contact or cancel out of it to create a new contact entry.");
2312 if ( ds.Tables[0].Rows.Count == 1 )
2313 {
2314 useExistingContact = true;
2315 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() != ds.Tables[0].Rows[0]["PerConID"].ToString() )
2316 {
2317 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"] = ds.Tables[0].Rows[0]["PerConID"];
2318 }
2319 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["EmployeeNum_c"].ToString() != empNum.ToString() )
2320 {
2321 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["EmployeeNum_c"] = empNum;//ds.Tables[0].Rows[0]["EmployeeNum_c"];
2322 }
2323 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"].ToString() != ds.Tables[0].Rows[0]["CorpName"].ToString() )
2324 {
2325 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"] = ds.Tables[0].Rows[0]["CorpName"];
2326 }
2327 }
2328 else
2329 {
2330
2331 //ds = SearchFunctions.listLookup(oTrans,"PerConAdapter", out recSelected, true, filter);
2332 ds = SearchFunctions.listLookup(oTrans,"PerConAdapter", out recSelected, false, filter);
2333 if ( recSelected )
2334 {
2335 useExistingContact = true;
2336 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() != ds.Tables[0].Rows[0]["PerConID"].ToString())
2337 {
2338 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"] = ds.Tables[0].Rows[0]["PerConID"];
2339 }
2340 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["EmployeeNum_c"].ToString() != empNum.ToString() )
2341 {
2342 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["EmployeeNum_c"] = empNum;//ds.Tables[0].Rows[0]["EmployeeNum_c"];
2343 }
2344 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"].ToString() != ds.Tables[0].Rows[0]["CorpName"].ToString() )
2345 {
2346 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"] = ds.Tables[0].Rows[0]["CorpName"];
2347 }
2348 }
2349 }
2350 }
2351 }catch ( Exception ex )
2352 {
2353 MessageBox.Show("Check Contact Exists: " + ex.Message);
2354 }
2355 return useExistingContact;
2356 }
2357
2358 private void CreateNewContact(string firstName, string lastName, object dboValue, string empNum, string company, int custNum)
2359 {
2360 try
2361 {
2362 Erp.Proxy.BO.PerConImpl boPerCon = null;
2363 boPerCon = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Erp.Proxy.BO.PerConImpl>((Ice.Core.Session)oTrans.Session, "erp/bo/percon.svc");
2364 Erp.BO.PerConDataSet dsPerCon = new Erp.BO.PerConDataSet();
2365 boPerCon.GetNewPerCon(dsPerCon);
2366 dsPerCon.Tables["PerCon"].Rows[0]["FirstName"] = firstName;
2367 dsPerCon.Tables["PerCon"].Rows[0]["LastName"] = lastName;
2368 dsPerCon.Tables["PerCon"].Rows[0]["Name"] = firstName + " " + lastName;
2369 dsPerCon.Tables["PerCon"].Rows[0]["EmployeeNum_c"] = empNum;
2370 dsPerCon.Tables["PerCon"].Rows[0]["CorpName"] = company;
2371 dsPerCon.Tables["PerCon"].Rows[0]["Company_c"] = company;
2372 if ( edvOrderDtl.Row > -1 )
2373 {
2374 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"] = company;
2375 }
2376 if ( dboValue == System.DBNull.Value )
2377 {
2378 dsPerCon.Tables["PerCon"].Rows[0]["DOB_c"] = new DateTime(1900,01,01);
2379 }
2380 else
2381 {
2382 dsPerCon.Tables["PerCon"].Rows[0]["DOB_c"] = dboValue;
2383 }
2384 boPerCon.Update(dsPerCon);
2385
2386 // if US company make the Person global
2387 Ice.Core.Session session = (Ice.Core.Session)oTrans.Session;
2388 if ( session.CompanyID == "250" )
2389 {
2390 dsPerCon.Tables["PerCon"].Rows[0]["RowMod"] = "U";
2391 dsPerCon.Tables["PerCon"].Rows[0]["GlobalPerCon"] = true;
2392 boPerCon.Update(dsPerCon);
2393 CreateLinkContact(session.CompanyID, Convert.ToInt32(dsPerCon.Tables["PerCon"].Rows[0]["PerConID"]), m_targetCompany, ref dsPerCon);
2394 }
2395
2396 //add to customer
2397 Erp.Proxy.BO.CustCntImpl boCustCnt = null;
2398 boCustCnt = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Erp.Proxy.BO.CustCntImpl>((Ice.Core.Session)oTrans.Session, "erp/bo/custcnt.svc");
2399 Erp.BO.CustCntDataSet dsCustCnt = new Erp.BO.CustCntDataSet();
2400 boCustCnt.GetNewCustCnt(dsCustCnt, custNum,"");
2401 boCustCnt.GetPerConData(Convert.ToInt32(dsPerCon.Tables["PerCon"].Rows[0]["PerConID"]),dsCustCnt);
2402 boCustCnt.Update(dsCustCnt);
2403
2404 /*DataRow newRow = m_dtDropDownTable.NewRow();
2405 newRow["PerConID"] = dsPerCon.Tables["PerCon"].Rows[0]["PerConID"];
2406 newRow["Name"] = dsPerCon.Tables["PerCon"].Rows[0]["Name"];
2407 newRow["DOB_c"] = dsPerCon.Tables["PerCon"].Rows[0]["DOB_c"];
2408 newRow["EmployeeNum_c"] = dsPerCon.Tables["PerCon"].Rows[0]["EmployeeNum_c"];
2409 m_dtDropDownTable.Rows.Add(newRow);
2410 */
2411 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"] = dsPerCon.Tables["PerCon"].Rows[0]["PerConID"];
2412
2413 boPerCon.Dispose();
2414 boPerCon = null;
2415 dsPerCon.Clear();
2416 dsPerCon = null;
2417
2418 boCustCnt.Dispose();
2419 boCustCnt = null;
2420 dsCustCnt.Clear();
2421 dsCustCnt = null;
2422
2423 txtFirstName.Text = "";
2424 epiTextBoxC4.Text = "";
2425 epiDateTimeEditorC1.Value = null;
2426
2427
2428 }catch ( Exception ex )
2429 {
2430 MessageBox.Show("CreateNewContact Error: " + ex.Message);
2431 }
2432 }
2433
2434 private void CreateLinkContact(string sourceCompany, int sourcePerConID, string targetCompany, ref Erp.BO.PerConDataSet sourcePerCon )
2435 {
2436 // MessageBox.Show("Create link");
2437 System.Collections.Hashtable parameters = null;
2438 DataTable dtGlbPerConExists = null;
2439 Erp.Proxy.BO.PerConImpl boPerConImpl = null;
2440 Erp.BO.GlbPerConDataSet dsGlbPerCon = null;
2441 int targetPerConID = 0;
2442
2443 try
2444 {
2445 // verify that glbpercon does not exist
2446 Ice.Core.Session currentSession = (Ice.Core.Session)oTrans.Session;
2447 parameters = new System.Collections.Hashtable();
2448 parameters.Add("psourcecompany", sourceCompany);
2449 parameters.Add("ptargetcompany", targetCompany);
2450 parameters.Add("psourceperconid", sourcePerConID);
2451 dtGlbPerConExists = GetQueryData("CPEGlobalContactLink", parameters);
2452 bool bLinked = false;
2453
2454 if ( dtGlbPerConExists.Rows.Count > 0 )
2455 {
2456 if ( Convert.ToInt32(dtGlbPerConExists.Rows[0]["GlbPerCon_PerConID"]) == 0 )
2457 {
2458 bLinked = false;
2459 }
2460 else
2461 {
2462 bLinked = true;
2463 // MessageBox.Show("Already linked to " + dtGlbPerConExists.Rows[0]["GlbPerCon_PerConID"].ToString());
2464 }
2465 }
2466
2467 {
2468
2469 // create row in GlbPerCon table using SQL
2470 if ( bLinked == false )
2471 {
2472 //string theInsert = "insert into erp.glbpercon " +
2473 // "(company, perconid, GlbCompany, GlbPerConID, GlobalPerCon, name, firstname, middlename, lastname, prname, func,FaxNum,PhoneNum,EMailAddress,CellPhoneNum,PagerNum,HomeNum,AltNum,Prefix,Suffix,Initials,WebSite,IM,Twitter,LinkedIn,FaceBook,WebLink1,WebLink2,WebLink3,WebLink4,WebLink5,Address1,Address2,Address3,City,State,Zip,Country,CountryNum,CorpName,RoleCode,Comment,ContactTitle,ReportsTo,PRLastName,PRFirstName,PRMiddleName ) " +
2474 // "select '200',0,company, perconid, 1, name,firstname, middlename, lastname, prname, func,FaxNum,PhoneNum,EMailAddress,CellPhoneNum,PagerNum,HomeNum,AltNum,Prefix,Suffix,Initials,WebSite,IM,Twitter,LinkedIn,FaceBook,WebLink1,WebLink2,WebLink3,WebLink4,WebLink5,Address1,Address2,Address3,City,State,Zip,Country,CountryNum,CorpName,RoleCode,Comment,ContactTitle,ReportsTo,PRLastName,PRFirstName,PRMiddleName from erp.percon where company = '" + sourceCompany + "' and perconid = " + sourcePerConID.ToString().Trim();
2475
2476 //SQLExecuteNonQuery(theInsert);
2477
2478 //MessageBox.Show("Sql done");
2479 // create contact ( name only )
2480
2481 boPerConImpl = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Erp.Proxy.BO.PerConImpl>(m_targetSession, "erp/bo/PerCon.svc");
2482 Erp.BO.PerConDataSet dsPerCon = new Erp.BO.PerConDataSet();
2483 boPerConImpl.GetNewPerCon(dsPerCon);
2484 dsPerCon.Tables["PerCon"].Rows[0]["Name"] = sourcePerCon.Tables["PerCon"].Rows[0]["Name"];
2485 boPerConImpl.DefaultName("Detail", 0, dsPerCon);
2486 boPerConImpl.Update(dsPerCon);
2487
2488 targetPerConID = Convert.ToInt32(dsPerCon.Tables["PerCon"].Rows[0]["PerConID"]);
2489 // MessageBox.Show(targetPerConID.ToString() + " id created" + ">>>" + sourceCompany + "`" + sourcePerConID);
2490 // link the contacts
2491 bool bFound = false;
2492 int counter = 0;
2493 while ( bFound == false && counter < 65 )
2494 {
2495 counter++;
2496 dsGlbPerCon = boPerConImpl.GetGlbPerConList(sourceCompany + "`" + sourcePerConID);
2497 if ( dsGlbPerCon.Tables["GlbPerCon"].Rows.Count > 0 )
2498 {
2499 bFound = true;
2500 dsGlbPerCon.Tables["GlbPerCon"].Rows[0]["LinkPerConID"] = targetPerConID;
2501 dsGlbPerCon.Tables["GlbPerCon"].Rows[0]["LinkName"] = sourcePerCon.Tables["PerCon"].Rows[0]["Name"];
2502 dsGlbPerCon.Tables["GlbPerCon"].Rows[0]["RowMod"] = "U";
2503 }
2504 else
2505 {
2506 System.Threading.Thread.Sleep(1000);
2507 }
2508 }
2509 // MessageBox.Show(dsGlbPerCon.Tables["GlbPerCon"].Rows.Count.ToString() + "Found it " + counter.ToString());
2510 //string message;
2511 //boPerConImpl.PreLinkGlbPerCon(sourceCompany, sourcePerConID, false, dsGlbPerCon, out message);
2512
2513 // MessageBox.Show("391");
2514 string[] copyColumns = {"DOB_c","EmployeeNum_c", "name","firstname","middlename","lastname","prname","func","FaxNum","PhoneNum","EMailAddress","CellPhoneNum","PagerNum","HomeNum","AltNum","Prefix","Suffix","Initials","WebSite","IM","Twitter","LinkedIn","FaceBook","WebLink1","WebLink2","WebLink3","WebLink4","WebLink5","Address1","Address2","Address3","City","State","Zip","Country","CountryNum","CorpName","RoleCode","Comment","ContactTitle","ReportsTo","PRLastName","PRFirstName","PRMiddleName"};
2515 foreach ( string colName in copyColumns )
2516 {
2517 dsPerCon.Tables["PerCon"].Rows[0][colName] = sourcePerCon.Tables["PerCon"].Rows[0][colName];
2518 }
2519 // MessageBox.Show("397");
2520 dsPerCon.Tables["PerCon"].Rows[0]["RowMod"] = "U";
2521 boPerConImpl.LinkGlbPerCon(sourceCompany, sourcePerConID, dsGlbPerCon, dsPerCon);
2522 dsPerCon.Tables["PerCon"].Rows[0]["GlbFlag"] = true;
2523 dsPerCon.Tables["PerCon"].Rows[0]["GlbLink"] = sourceCompany + "~" + sourcePerConID;
2524 dsPerCon.Tables["PerCon"].Rows[0]["RowMod"] = "U";
2525 boPerConImpl.Update(dsPerCon);
2526 // MessageBox.Show("linked");
2527
2528 dsPerCon.Clear();
2529 dsGlbPerCon.Clear();
2530
2531 }
2532
2533 }
2534
2535
2536
2537
2538 // clean everything up
2539 }catch ( Exception ex )
2540 {
2541 MessageBox.Show("Create Global Contact Link Error: " + ex.Message);
2542 }
2543 finally
2544 {
2545 if ( boPerConImpl != null )
2546 {
2547 boPerConImpl.Dispose();
2548 boPerConImpl = null;
2549 }
2550
2551 if ( parameters != null )
2552 {
2553 parameters.Clear();
2554 parameters = null;
2555 }
2556 if ( dtGlbPerConExists != null )
2557 {
2558 dtGlbPerConExists.Clear();
2559 dtGlbPerConExists = null;
2560 }
2561 }
2562
2563 }
2564 private void UpdateContact(int perCon, string empNum, string company, int custNum)
2565 {
2566 try
2567 {
2568 Erp.Proxy.BO.PerConImpl boPerCon = null;
2569 boPerCon = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Erp.Proxy.BO.PerConImpl>((Ice.Core.Session)oTrans.Session, "erp/bo/percon.svc");
2570 Erp.BO.PerConDataSet dsPerCon = boPerCon.GetByID(perCon);
2571 //MessageBox.Show("UpdateContact to: " + perCon.ToString() + " num=" + empNum);
2572 /*dsPerCon.Tables["PerCon"].Rows[0]["EmployeeNum_c"] = empNum;
2573 dsPerCon.Tables["PerCon"].Rows[0]["CorpName"] = company;
2574 dsPerCon.Tables["PerCon"].Rows[0]["Company_c"] = company;
2575
2576 boPerCon.Update(dsPerCon);
2577 */
2578 Erp.Proxy.BO.CustCntImpl boCustCnt = null;
2579 boCustCnt = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Erp.Proxy.BO.CustCntImpl>((Ice.Core.Session)oTrans.Session, "erp/bo/custcnt.svc");
2580 Erp.BO.CustCntDataSet dsCustCnt = new Erp.BO.CustCntDataSet();
2581 try
2582 {
2583 //add to customer
2584
2585 boCustCnt.GetNewCustCnt(dsCustCnt, custNum,"");
2586 boCustCnt.GetPerConData(perCon,dsCustCnt);
2587 boCustCnt.Update(dsCustCnt);
2588 }catch
2589 {
2590 }
2591 finally
2592 {
2593 boCustCnt.Dispose();
2594 boCustCnt = null;
2595 dsCustCnt.Clear();
2596 dsCustCnt = null;
2597 }
2598
2599 boPerCon.Dispose();
2600 boPerCon = null;
2601 dsPerCon.Clear();
2602 dsPerCon = null;
2603
2604
2605
2606
2607
2608 }catch ( Exception ex )
2609 {
2610 MessageBox.Show("Update Contact Error: " + ex.Message);
2611 }
2612 }
2613 private DataSet BOReaderData(string businessObject, string filter, string fieldList)
2614 {
2615 DataSet ds = new DataSet();
2616 Ice.Core.Session session = null;
2617 Ice.Proxy.Lib.BOReaderImpl boReader = null;
2618 try
2619 {
2620 session = (Ice.Core.Session)oTrans.Session;
2621 boReader = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Ice.Proxy.Lib.BOReaderImpl>(session, "ice/lib/BOReader.svc");
2622 ds = boReader.GetRows("Erp:BO:" + businessObject, filter, fieldList);
2623 }
2624 catch (Exception ex)
2625 {
2626 MessageBox.Show("Populate from BO error: " + ex.Message);
2627 }
2628 finally
2629 {
2630 if (boReader != null)
2631 {
2632
2633 boReader.Dispose();
2634 }
2635 }
2636 return ds;
2637 }
2638
2639/* START - Greg's SQL functions copied from Search Form area below */
2640
2641 private System.Data.SqlClient.SqlConnection GetSQLConnection()
2642 {
2643 try
2644 {
2645 System.Data.SqlClient.SqlConnection SQLCon = new System.Data.SqlClient.SqlConnection();
2646 string timeout = "3000";
2647 //ENV
2648 string connectionString = "Persist Security Info=false;Integrated Security=false;database=erp1016CRP;User ID=EpicorViews;password=Ep1c0rViews;server=CPE-ERPSQL;Connect Timeout=" + timeout;
2649 SQLCon.ConnectionString = connectionString;
2650 SQLCon.Open();
2651 return SQLCon;
2652 }
2653 catch (Exception ex)
2654 {
2655 MessageBox.Show("GetSQLConnection error: " + ex.Message);
2656 }
2657 return null;
2658
2659 }
2660
2661 private DataTable SQLExecuteSelect(string selectStatement)
2662 {
2663 DataTable dt = new DataTable();
2664 try
2665 {
2666 System.Data.SqlClient.SqlConnection SQLCon = GetSQLConnection();
2667 System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(selectStatement, SQLCon);
2668 command.CommandTimeout = 90;
2669 System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader();
2670 dt.Load(reader);
2671 DisconnectCon(SQLCon);
2672 // set readonly = false
2673 foreach (DataColumn col in dt.Columns)
2674 {
2675 col.ReadOnly = false;
2676 }
2677 }
2678 catch (Exception ex)
2679 {
2680 MessageBox.Show("Select statement error " + ex.Message + "\n\n" + selectStatement);
2681 }
2682 return dt;
2683 }
2684
2685 private void DisconnectCon(System.Data.SqlClient.SqlConnection SQLCon)
2686 {
2687 try
2688 {
2689 SQLCon.Close();
2690 SQLCon = null;
2691 }
2692 catch (Exception ex)
2693 {
2694 }
2695
2696 }
2697/* END - Greg's SQL functions copied from Search Form area below */
2698
2699 private void LoadDOBDropDown()
2700
2701 {
2702/*
2703 try
2704 {
2705
2706 cmvPerConName.ReadOnly = true;
2707 cmbContactDOB.ReadOnly = true;
2708 cmbEmployeeNum.ReadOnly = true;
2709/*
2710 DataSet ds = BOReaderData("PerCon", "", "PerConID,Name,DOB_c,EmployeeNum_c");
2711 m_dtDropDownTable = ds.Tables[0];
2712 cmbContactDOB.DataSource = ds.Tables[0];
2713 cmbContactDOB.DisplayMember = "DOB_c";
2714 cmbContactDOB.ValueMember = "PerConID";
2715 cmvPerConName.DataSource = ds.Tables[0];
2716 cmvPerConName.DisplayMember = "Name";
2717 cmvPerConName.ValueMember = "PerConID";
2718 cmbEmployeeNum.DataSource = ds.Tables[0];
2719 cmbEmployeeNum.DisplayMember = "EmployeeNum_c";
2720 cmbEmployeeNum.ValueMember = "PerConID";
2721* /
2722 string query = " SELECT PerConID, Name, EmployeeNum_c, DOB_c FROM ERP.PerCon pc JOIN ERP.PerCon_UD pcud ON pcud.ForeignSysRowID = pc.SysRowID";
2723 DataTable dt = SQLExecuteSelect(query);
2724 cmbContactDOB.DataSource = dt;
2725 cmbContactDOB.DisplayMember = "DOB_c";
2726 cmbContactDOB.ValueMember = "PerConID";
2727 cmvPerConName.DataSource = dt;
2728 cmvPerConName.DisplayMember = "Name";
2729 cmvPerConName.ValueMember = "PerConID";
2730 cmbEmployeeNum.DataSource = dt;
2731 cmbEmployeeNum.DisplayMember = "EmployeeNum_c";
2732 cmbEmployeeNum.ValueMember = "PerConID";
2733
2734 }catch ( Exception ex )
2735 {
2736 MessageBox.Show("LoadDOBDropDown error: " + ex.Message);
2737 }
2738*/
2739 }
2740
2741 private void SetHeaderPriceListDropDown(int custNum, string shipToNum)
2742 {
2743 try
2744 {
2745 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
2746 parameters.Add("pcustnum", custNum.ToString());
2747 parameters.Add("pshiptonum", shipToNum);
2748 //DataTable dt = GetQueryData("CPEPriceLists", parameters);
2749 DataTable dtCustPriceLst = GetQueryData("CPE_CustomerPriceLists", parameters);
2750 DataTable dtGrpPriceLst = GetQueryData("CPE_CustGrpPriceLists", parameters);
2751 foreach ( DataRow grpRow in dtGrpPriceLst.Rows )
2752 {
2753 DataRow[] exists = dtCustPriceLst.Select("Calculated_Value = '" + grpRow["Calculated_Value"].ToString() + "'");
2754 if ( exists.Length <= 0 )
2755 {
2756 dtCustPriceLst.ImportRow(grpRow);
2757 }
2758
2759 }
2760 cmbHeaderPriceList.DataSource = dtCustPriceLst;
2761 cmbHeaderPriceList.DisplayMember = "Calculated_Display";
2762 cmbHeaderPriceList.ValueMember = "Calculated_Value";
2763 }catch ( Exception ex )
2764 {
2765 MessageBox.Show("SetHeaderPriceList dropdown: " + ex.Message);
2766 }
2767 }
2768
2769 private void SetVersionNumber()
2770 {
2771 string custName = oTrans.EpiBaseForm.CustomizationName;
2772 string version = custName;
2773 if ( custName.LastIndexOf("_") > 0 )
2774 {
2775 version = custName.Substring(custName.LastIndexOf("_") + 1, custName.Length - custName.LastIndexOf("_") - 1);
2776 }
2777 SalesOrderForm.Text = SalesOrderForm.Text + " - Version " + m_version;
2778
2779 }
2780
2781
2782 private void edvOrderDtl_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
2783 {
2784 // ** Argument Properties and Uses **
2785 // view.dataView[args.Row]["FieldName"]
2786 // args.Row, args.Column, args.Sender, args.NotifyType
2787 // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
2788 try
2789 {
2790 if ( edvOrderDtl.Row > -1 )
2791 {
2792 btnCreateNewContact.ReadOnly = false;
2793 btnSelectContact.ReadOnly = false;
2794 }
2795 else
2796 {
2797 btnCreateNewContact.ReadOnly = true;
2798 btnSelectContact.ReadOnly = true;
2799 }
2800 if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
2801 {
2802 /*if ((args.Row > -1))
2803 {
2804 view.dataView[args.Row]["Copy"] = "From Previous";
2805 view.dataView[args.Row]["New"] = "New Line";
2806 view.dataView[args.Row]["Search"] = "Search";
2807 }*/
2808 view.dataView[args.Row]["SalesUM"] = "PR";
2809 }
2810
2811 }catch ( Exception ex )
2812 {
2813 //MessageBox.Show("edvOrderDtl error" + ex.Message);
2814 }
2815 }
2816
2817 private void SetExtendedProperties()
2818 {
2819 // Begin Wizard Added EpiDataView Initialization
2820 EpiDataView edvOrderDtl = ((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"]));
2821 EpiDataView edvOrderHed = ((EpiDataView)(this.oTrans.EpiDataViews["OrderHed"]));
2822 // End Wizard Added EpiDataView Initialization
2823
2824 // Begin Wizard Added Conditional Block
2825 if (edvOrderDtl.dataView.Table.Columns.Contains("PerConDropDown_c"))
2826 {
2827 // Begin Wizard Added ExtendedProperty Settings: edvOrderDtl-PerConDropDown_c
2828 edvOrderDtl.dataView.Table.Columns["PerConDropDown_c"].ExtendedProperties["ReadOnly"] = true;
2829 // End Wizard Added ExtendedProperty Settings: edvOrderDtl-PerConDropDown_c
2830 }
2831 if (edvOrderDtl.dataView.Table.Columns.Contains("PerConCorpName_c"))
2832 {
2833 // Begin Wizard Added ExtendedProperty Settings: edvOrderDtl-PerConCorpName_c
2834 edvOrderDtl.dataView.Table.Columns["PerConCorpName_c"].ExtendedProperties["ReadOnly"] = true;
2835 // End Wizard Added ExtendedProperty Settings: edvOrderDtl-PerConCorpName_c
2836 }
2837 if (edvOrderHed.dataView.Table.Columns.Contains("CommentsFromCustomer_c"))
2838 {
2839 // Begin Wizard Added ExtendedProperty Settings: edvOrderHed-CommentsFromCustomer_c
2840 edvOrderHed.dataView.Table.Columns["CommentsFromCustomer_c"].ExtendedProperties["ReadOnly"] = true;
2841 // End Wizard Added ExtendedProperty Settings: edvOrderHed-CommentsFromCustomer_c
2842 }
2843 if (edvOrderDtl.dataView.Table.Columns.Contains("EmployeeNum_c"))
2844 {
2845 // Begin Wizard Added ExtendedProperty Settings: edvOrderDtl-EmployeeNum_c
2846 //greg edvOrderDtl.dataView.Table.Columns["EmployeeNum_c"].ExtendedProperties["ReadOnly"] = true;
2847 // End Wizard Added ExtendedProperty Settings: edvOrderDtl-EmployeeNum_c
2848 }
2849 // End Wizard Added Conditional Block
2850 }
2851
2852 private bool GetLatestRev(string partNum, string site, out string rev)
2853 {
2854 bool hasRev = false;
2855 rev = "";
2856 try
2857 {
2858 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
2859 parameters.Add("ppartnum", partNum );
2860 parameters.Add("psite", site );
2861
2862 DataTable dt = GetQueryData("CPELatestRevBySite", parameters);
2863 if ( dt.Rows.Count > 0 )
2864 {
2865 rev = dt.Rows[0]["PartRev_RevisionNum"].ToString();
2866 hasRev = true;
2867 }
2868 //MessageBox.Show("334: partnum:" + partNum + " site:" + site + " rev:" + rev);
2869 }
2870 catch ( Exception ex )
2871 {
2872 MessageBox.Show("GetLastest rev error: " + ex.Message);
2873 }
2874 return hasRev;
2875 }
2876
2877 private int ChangeItem(bool bShow, int proposedValue, ref EpiDataView edv, string key, string adapter, System.Collections.Hashtable fromToHash)
2878 {
2879 int value = proposedValue;
2880 try
2881 {
2882 //if ( bShow )
2883 {
2884
2885 bool recSelected;
2886 string where = "";
2887 if ( bShow == false )
2888 {
2889 where = key + " = " + proposedValue;
2890 }
2891 DataSet ds = SearchFunctions.listLookup(oTrans, adapter, out recSelected, bShow, where);
2892 if ( bShow == false && recSelected == false )
2893 {
2894 MessageBox.Show("ChangeItem error: " + key + ": " + proposedValue + " does not exist.");
2895 value = 0;
2896
2897 if ( edv.Row > -1 )
2898 {
2899 foreach ( System.Collections.DictionaryEntry dic in fromToHash )
2900 {
2901 edv.dataView.Table.Rows[edv.Row][dic.Key.ToString()] = 0;
2902 }
2903 value = 0;
2904 }
2905
2906
2907 }
2908 else
2909 {
2910 if ( edv.Row > -1 )
2911 {
2912 foreach ( System.Collections.DictionaryEntry dic in fromToHash )
2913 {
2914 if ( key.Trim().ToLower() == dic.ToString().Trim().ToLower() )
2915 {
2916 if ( Convert.ToInt32(edv.dataView.Table.Rows[edv.Row][key]) != Convert.ToInt32(ds.Tables[0].Rows[0][dic.Value.ToString()]) )
2917 {
2918 edv.dataView.Table.Rows[edv.Row][key] = Convert.ToInt32(ds.Tables[0].Rows[0][dic.Value.ToString()]);
2919 }
2920 value = Convert.ToInt32(ds.Tables[0].Rows[0][key]);
2921 }
2922 else
2923 {
2924 if ( Convert.ToInt32(edv.dataView.Table.Rows[edv.Row][dic.Key.ToString()]) != Convert.ToInt32(ds.Tables[0].Rows[0][dic.Value.ToString()]) )
2925 {
2926 edv.dataView.Table.Rows[edv.Row][dic.Key.ToString()] = Convert.ToInt32(ds.Tables[0].Rows[0][dic.Value.ToString()]);
2927 }
2928 }
2929 }
2930 }
2931 else
2932 {
2933 value = 0;
2934 }
2935 }
2936 }
2937 }
2938 catch ( Exception ex )
2939 {
2940 MessageBox.Show("Change " + key + " error:" + ex.Message);
2941 }
2942
2943 return value;
2944 }
2945
2946 private int ChangeContact(bool bShow, int proposedValue)
2947 {
2948 System.Collections.Hashtable fromToHash = new System.Collections.Hashtable();
2949 fromToHash.Add("PerCon_c", "PerConID");
2950 fromToHash.Add("PerConDropDown_c", "PerConID");
2951
2952 int perCon = ChangeItem(bShow, proposedValue, ref edvOrderDtl, "PerConID", "PerConAdapter", fromToHash);
2953 fromToHash.Clear();
2954 fromToHash = null;
2955
2956 return perCon;
2957 }
2958
2959
2960 private void epiNumericEditorC1_Leave(object sender, System.EventArgs args)
2961 {
2962
2963 }
2964
2965 private void OrderDtl_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
2966 {
2967 // ** Argument Properties and Uses **
2968 // args.Row["FieldName"]
2969 // args.Column, args.ProposedValue, args.Row
2970 // Add Event Handler Code
2971 //switch (args.Column.ColumnName)
2972 {
2973 // MessageBox.Show("802 Before: " + args.Column.ColumnName + " <=" + args.ProposedValue.ToString() + "<");
2974 }
2975 }
2976
2977 private void SalesOrderForm_Load(object sender, EventArgs args)
2978 {
2979 txtCustomerComments.Dock = DockStyle.Fill;
2980 try
2981 {
2982 SetHeaderPriceListDropDown(0,"");
2983 //edvOrderDtl.dataView.Table.Columns.Add(new DataColumn("Copy", System.Type.GetType("System.String")));
2984 //edvOrderDtl.dataView.Table.Columns.Add(new DataColumn("New", System.Type.GetType("System.String")));
2985 //edvOrderDtl.dataView.Table.Columns.Add(new DataColumn("Search", System.Type.GetType("System.String")));
2986 m_hashCopyColumns = new System.Collections.Hashtable();
2987 string[] columns = {"BoxNumber_c","OpportunityNum_c", "PartNum","SellingQuantity","SalesUM","PerConFirstName_c","PerConLastName_c","PerConDOB_c","PerConID_c","EmployeeNum_c","DocUnitPrice","Colour_c","Filter_c","CPE_MouldRight_c", "CPE_MouldLeft_c","CPE_Cast_c","PerCon_c","PerConCorpName_c"};
2988 foreach (string column in columns)
2989 {
2990 m_hashCopyColumns.Add(column.ToLower(),0);
2991 }
2992 m_ContactSearch = new ContactSearch("Person // Contact");
2993
2994 m_ContactSearch.Icon = SalesOrderForm.Icon;
2995
2996 m_CastSearch = new ContactSearch("Cast Number");
2997 m_CastSearch.Icon = SalesOrderForm.Icon;
2998
2999 }catch ( Exception ex )
3000 {
3001 MessageBox.Show("SalesOrderForm_Load1 error: " + ex.Message);
3002 }
3003 LoadDOBDropDown();
3004 SetVersionNumber();
3005 grdDtlList.Dock = DockStyle.Fill;
3006 m_dtSalesUM = SetGridDropDown(grdDtlList, "SalesUM", "CPEUOM");
3007
3008 DataTable dtSearch = new DataTable();
3009 dtSearch.Columns.Add("Value");
3010 dtSearch.Columns.Add("Display");
3011 DataRow newRow = dtSearch.NewRow();
3012 newRow["Value"] = "Auto3";
3013 newRow["Display"] = "3 Character Last Name Auto Search";
3014 dtSearch.Rows.Add(newRow);
3015 newRow = dtSearch.NewRow();
3016 newRow["Value"] = "GridButton";
3017 newRow["Display"] = "Button Click Search";
3018 dtSearch.Rows.Add(newRow);
3019 cmbSearchType.DataSource = dtSearch;
3020 cmbSearchType.ValueMember = "Value";
3021 cmbSearchType.DisplayMember = "Display";
3022 cmbSearchType.Value = "GridButton";
3023 grdDtlList.DisplayLayout.Bands[0].Columns["Search_c"].Hidden = false;
3024
3025 try
3026 {
3027
3028 grdDtlList.DisplayLayout.Bands[0].Columns["Copy_c"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
3029 grdDtlList.DisplayLayout.Bands[0].Columns["Copy_c"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
3030
3031 grdDtlList.DisplayLayout.Bands[0].Columns["Search_c"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
3032 grdDtlList.DisplayLayout.Bands[0].Columns["Search_c"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
3033
3034 grdDtlList.DisplayLayout.Bands[0].Columns["New_c"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
3035 grdDtlList.DisplayLayout.Bands[0].Columns["New_c"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
3036
3037 grdDtlList.DisplayLayout.Bands[0].Columns["CPE_Cast_c"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
3038 grdDtlList.DisplayLayout.Bands[0].Columns["CPE_Cast_c"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
3039
3040 grdDtlList.DisplayLayout.Bands[0].Override.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Button3D;
3041 //grdDtlList.DisplayLayout.Bands[0].Columns["Search"].Header.VisiblePosition = 6;
3042 }catch ( Exception ex )
3043 {
3044 MessageBox.Show("SalesOrderForm_Load2 error: " + ex.Message);
3045 }
3046
3047 }
3048
3049 private void grdDtlList_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs args)
3050 {
3051 // Event handling code generated by wizard.
3052 args.Cancel = true;
3053 this.oTrans.SetCurrentEvent(TransactionEvent.AddNewOnNewFromGrid);
3054 try
3055 {
3056 oTrans.GetNewOrderDtl();
3057 } catch (System.Exception )
3058 {
3059 }
3060 }
3061 private DataTable GetQueryData(string baqName, System.Collections.Hashtable parameters)
3062 {
3063 // ** Place Event Handling Code Here **
3064 string orgbaqName = baqName;
3065 Ice.Core.Session session = (Ice.Core.Session)oTrans.Session;
3066 Ice.BO.DynamicQueryDataSet baqQuery = null;
3067 Ice.BO.QueryExecutionDataSet executionDS = null;
3068 string caption = string.Empty;
3069 Ice.Adapters.DynamicQueryAdapter adDynamicQuery = new Ice.Adapters.DynamicQueryAdapter(oTrans);
3070 adDynamicQuery.BOConnect();
3071 try
3072 {
3073
3074 adDynamicQuery.ClearDynamicQueryData();
3075 try
3076 {
3077 baqQuery = adDynamicQuery.GetQueryDesignData(baqName) as Ice.BO.DynamicQueryDataSet;
3078 }
3079 catch
3080 {
3081 baqName = session.CompanyID + "-" + baqName;
3082 baqQuery = adDynamicQuery.GetQueryDesignData(baqName) as Ice.BO.DynamicQueryDataSet;
3083 }
3084 executionDS = adDynamicQuery.GetQueryExecutionParametersByID(baqName);
3085 if (baqQuery != null && executionDS != null)
3086 {
3087 for (int i = 0; i < executionDS.ExecutionParameter.Rows.Count; i++)
3088 {
3089 string executeParams = executionDS.ExecutionParameter[i]["ParameterID"].ToString().Trim().ToLower();
3090 if (parameters.Contains(executeParams))
3091 {
3092 executionDS.ExecutionParameter[i]["ParameterValue"] = parameters[executeParams].ToString();
3093 }
3094 }
3095
3096 executionDS.AcceptChanges();
3097
3098 adDynamicQuery.Execute(baqQuery, executionDS);
3099 }
3100 else
3101 {
3102 MessageBox.Show("GetQueryData error1: " + baqName + " not found.");
3103 }
3104 //return m_adDynamicQuery.QueryResults.Tables[0];
3105 }
3106 catch (Exception ex)
3107 {
3108 MessageBox.Show("GetQueryData2:Error running BAQ " + orgbaqName + " or " + baqName + ":" + ex.Message);
3109
3110 }
3111
3112 DataTable dataTable = adDynamicQuery.QueryResults.Tables[0];//.Copy();
3113 adDynamicQuery.Dispose();
3114 adDynamicQuery = null;
3115 return dataTable;
3116
3117 }
3118
3119 private DataTable SetGridDropDown(Infragistics.Win.UltraWinGrid.UltraGrid grid, string columnName, string BAQ)
3120 {
3121 DataTable dt = new DataTable();
3122 try
3123 {
3124 grid.DisplayLayout.Bands[0].Columns[columnName].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;
3125 Infragistics.Win.ValueList theList = new Infragistics.Win.ValueList();
3126 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
3127 // parameters.Add("pcompany", ((Ice.Core.Session)oTrans.Session).CompanyID );
3128
3129 dt = GetQueryData(BAQ, parameters);
3130
3131 foreach (DataRow row in dt.Rows )
3132 theList.ValueListItems.Add(row["Calculated_Display"].ToString(), row["Calculated_Value"].ToString());
3133
3134 grid.DisplayLayout.Bands[0].Columns[columnName].ValueList = theList;
3135 }
3136 catch ( Exception ex )
3137 {
3138 MessageBox.Show("Modify Grid error: " + ex.Message);
3139 }
3140 return dt;
3141 }
3142
3143 private void SetGridDropDown(Infragistics.Win.UltraWinGrid.UltraGrid grid, string columnName, string[] color_array)
3144 {
3145 try
3146 {
3147 grid.DisplayLayout.Bands[0].Columns[columnName].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;
3148 Infragistics.Win.ValueList theList = new Infragistics.Win.ValueList();
3149 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
3150 foreach (string color in color_array ) theList.ValueListItems.Add(color);
3151 grid.DisplayLayout.Bands[0].Columns[columnName].ValueList = theList;
3152 }
3153 catch ( Exception ex )
3154 {
3155 MessageBox.Show("Modify Grid error: " + ex.Message);
3156 }
3157 return;
3158 }
3159
3160 private void SetGridDropDown(Infragistics.Win.UltraWinGrid.UltraGrid grid, string columnName, List<string> color_array)
3161 {
3162 try
3163 {
3164 grid.DisplayLayout.Bands[0].Columns[columnName].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;
3165 Infragistics.Win.ValueList theList = new Infragistics.Win.ValueList();
3166 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
3167 foreach (string color in color_array ) theList.ValueListItems.Add(color);
3168 grid.DisplayLayout.Bands[0].Columns[columnName].ValueList = theList;
3169 }
3170 catch ( Exception ex )
3171 {
3172 MessageBox.Show("Modify Grid error: " + ex.Message);
3173 }
3174 return;
3175 }
3176
3177 private void oTrans_ordAdapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
3178 {
3179 // ** Argument Properties and Uses **
3180 // ** args.MethodName **
3181 // ** Add Event Handler Code **
3182
3183 // ** Use MessageBox to find adapter method name
3184 // EpiMessageBox.Show(args.MethodName)
3185 switch (args.MethodName)
3186 {
3187 case "Update":
3188 case "MasterUpdate":
3189 // MessageBox.Show("MasterUpdate");
3190 if ( edvOrderDtl.Row > -1 && edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["RowMod"].ToString() == "A" )
3191 {
3192 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["Copy_c"] = "";
3193 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["New_c"] = "";
3194 //edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["Search"] = "";
3195 }
3196
3197 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
3198 parameters.Add("pcustid", m_custID);
3199 DataTable dt = GetQueryData("CPECustomerPORequired", parameters);
3200 if ( dt.Rows.Count > 0 )
3201 {
3202 //MessageBox.Show("PO Required is " + dt.Rows[0]["Customer_PORequired_c"]);
3203 //MessageBox.Show("PO length is: " + edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["PONum"].ToString().Length);
3204 if (Convert.ToBoolean(dt.Rows[0]["Customer_PORequired_c"]) && (edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["PONum"].ToString().Length == 0))
3205 {
3206 MessageBox.Show("Customer requires a PO number");
3207 args.Cancel = true;
3208 }
3209 }
3210 // DialogResult dialogResult = EpiMessageBox.Show("Cancel Update?", "Cancel", MessageBoxButtons.YesNo);
3211 // if ((dialogResult == DialogResult.Yes))
3212 // {
3213 // args.Cancel = true;
3214 // } else
3215 // {
3216 // DoSomethingElse();
3217 // }
3218 break;
3219 }
3220
3221 }
3222
3223 private void grdDtlList_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs args)
3224 {
3225 if ( args.Cell.Column.Key == "Copy_c" )
3226 {
3227 CopyFromPrevious(true);
3228 }
3229 else if ( args.Cell.Column.Key == "New_c" )
3230 {
3231 CopyFromPrevious(false);
3232 }
3233 else if ( args.Cell.Column.Key == "CPE_Cast_c")
3234 {
3235 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PartNum"].ToString().EndsWith("R") )
3236 {
3237 string select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', " +
3238 " case when PerCon_1_2_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '1' when PerCon_3_4_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '3' when PerCon_5_6_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '5' when PerCon_7_8_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '7' when PerCon_9_10_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '9' else '' end as RightMould, " +
3239 " case when PerCon_1_2_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '2' when PerCon_3_4_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '4' when PerCon_5_6_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '6' when PerCon_7_8_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '8' when PerCon_9_10_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then '10' else '' end as LeftMould, " +
3240 " case when PerCon_1_2_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then lotnum + '1-2' when PerCon_3_4_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then lotnum + '3-4' when PerCon_5_6_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then lotnum + '5-6' when PerCon_7_8_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then lotnum + '7-8' when PerCon_9_10_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then lotnum + '9-10' else '' end as SerialNo, case when PerCon_1_2_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then PerCon_1_2_Notes_c when PerCon_3_4_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then PerCon_3_4_Notes_c when PerCon_5_6_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then PerCon_5_6_Notes_c when PerCon_7_8_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then PerCon_7_8_Notes_c when PerCon_9_10_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " then PerCon_9_10_Notes_c else '' end as Notes from dbo.partlot where company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and expirationdate > GETDATE() and ( PerCon_1_2_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " or PerCon_3_4_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " or PerCon_5_6_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() +" or PerCon_7_8_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() +" or PerCon_9_10_c = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + ")";
3241 if ( ((Ice.Core.Session)oTrans.Session).CompanyID == "250" )
3242 {
3243 select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', " +
3244 " case when PerCon_1_2_c = glb.perconid then '1' when PerCon_3_4_c = glb.perconid then '3' when PerCon_5_6_c = glb.perconid then '5' when PerCon_7_8_c = glb.perconid then '7' when PerCon_9_10_c = glb.perconid then '9' else '' end as RightMould, " +
3245 " case when PerCon_1_2_c = glb.perconid then '2' when PerCon_3_4_c = glb.perconid then '4' when PerCon_5_6_c = glb.perconid then '6' when PerCon_7_8_c = glb.perconid then '8' when PerCon_9_10_c = glb.perconid then '10' else '' end as LeftMould, " +
3246 " case when PerCon_1_2_c = glb.perconid then lotnum + '1-2' when PerCon_3_4_c = glb.perconid then lotnum + '3-4' when PerCon_5_6_c = glb.perconid then lotnum + '5-6' when PerCon_7_8_c = glb.perconid then lotnum + '7-8' when PerCon_9_10_c = glb.perconid then lotnum + '9-10' else '' end as SerialNo, " +
3247 " case when PerCon_1_2_c = glb.perconid then PerCon_1_2_Notes_c when PerCon_3_4_c = glb.perconid then PerCon_3_4_Notes_c when PerCon_5_6_c = glb.perconid then PerCon_5_6_Notes_c when PerCon_7_8_c = glb.perconid then PerCon_7_8_Notes_c when PerCon_9_10_c = glb.perconid then PerCon_9_10_Notes_c else '' end as Notes from dbo.partlot as pl with (nolock) join erp.glbpercon as glb with (nolock) on pl.company = glb.company and glb.glbperconid = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " and ( pl.PerCon_1_2_c = glb.perconid or pl.PerCon_3_4_c = glb.perconid or pl.PerCon_5_6_c = glb.perconid or pl.PerCon_7_8_c = glb.perconid or pl.PerCon_9_10_c = glb.perconid ) where pl.company = '200' and expirationdate > GETDATE() ";
3248 }
3249 LaunchCastSearch(select, true);
3250 }
3251 }
3252 else if ( args.Cell.Column.Key == "Search_c" )
3253 {
3254 if ( edvOrderDtl.Row > -1 )
3255 {
3256 //MessageBox.Show("1");
3257
3258 string select = "SELECT PerConID as PerConID, FirstName, LastName, DOB_c as DOB, EmployeeNum_c as EmployeeNum, CorpName as Company, Comment," +
3259 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3260 " '1' " +
3261 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3262 " '3' " +
3263 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3264 " '5' " +
3265 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3266 " '7' " +
3267 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3268 " '9' " +
3269 " else " +
3270 " '' " +
3271 " end as RightMould, " +
3272 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3273 " '2' " +
3274 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3275 " '4' " +
3276 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3277 " '6' " +
3278 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3279 " '8' " +
3280 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3281 " '10' " +
3282 " else " +
3283 " '' " +
3284 " end as LeftMould, " +
3285 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3286 " plo.lotnum + '1-2' " +
3287 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3288 " plo.lotnum + '3-4' " +
3289 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3290 " plo.lotnum + '5-6' " +
3291 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3292 " plo.lotnum + '7-8' " +
3293 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3294 " plo.lotnum + '9-10' " +
3295 " else " +
3296 " '' " +
3297 " end as SerialNo" +
3298 " , case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3299 " plo.PerCon_1_2_Notes_c " +
3300 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3301 " plo.PerCon_3_4_Notes_c " +
3302 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3303 " plo.PerCon_5_6_Notes_c " +
3304 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3305 " plo.PerCon_7_8_Notes_c " +
3306 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3307 " plo.PerCon_9_10_Notes_c " +
3308 " else " +
3309 " '' " +
3310 " end " +
3311 " as Notes, " +
3312 " plo.ExpirationDate as ExpirationDate, " +
3313 " plo.lotnum as ExistingCast " +
3314" ,ml.MfgLoc" +
3315 " from dbo.percon with (nolock) " +
3316 " left outer join dbo.partlot as plo on plo.company = dbo.percon.company and plo.ExpirationDate > GetDate() and ( plo.percon_1_2_c = PerConID or plo.percon_3_4_c = PerConID or plo.percon_5_6_c = PerConID or plo.percon_7_8_c = PerConID or plo.percon_9_10_c = PerConID) " +
3317" LEFT JOIN dbo.CPE_SLXLotNumMfgLoc ml ON ml.LotNum COLLATE SQL_Latin1_General_CP1250_CI_AS = plo.LotNum" +
3318
3319 " where dbo.percon.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and dbo.percon.LastName = '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"].ToString() + "' and dbo.percon.FirstName = '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"].ToString() + "' order by dbo.percon.perconid, ExistingCast ";
3320/*
3321string select = "SELECT PerConID as PerConID, FirstName, LastName, DOB_c as DOB, EmployeeNum_c as EmployeeNum, CorpName as Company, Comment," +
3322" case when plo.percon_1_2_c = dbo.percon.PerConID then '1' " +
3323" when plo.percon_3_4_c = dbo.percon.PerConID then '3' " +
3324" when plo.percon_5_6_c = dbo.percon.PerConID then '5' " +
3325" when plo.percon_7_8_c = dbo.percon.PerConID then '7' " +
3326" when plo.percon_9_10_c = dbo.percon.PerConID then '9' " +
3327" else '' " +
3328 " end as RightMould, " +
3329" case when plo.percon_1_2_c = dbo.percon.PerConID then '2' " +
3330 " when plo.percon_3_4_c = dbo.percon.PerConID then '4' " +
3331 " when plo.percon_5_6_c = dbo.percon.PerConID then '6' " +
3332 " when plo.percon_7_8_c = dbo.percon.PerConID then '8' " +
3333 " when plo.percon_9_10_c = dbo.percon.PerConID then '10' " +
3334 " else '' " +
3335 " end as LeftMould, " +
3336 " case when plo.percon_1_2_c = dbo.percon.PerConID then plo.lotnum + '1-2' " +
3337 " when plo.percon_3_4_c = dbo.percon.PerConID then plo.lotnum + '3-4' " +
3338 " when plo.percon_5_6_c = dbo.percon.PerConID then plo.lotnum + '5-6' " +
3339 " when plo.percon_7_8_c = dbo.percon.PerConID then plo.lotnum + '7-8' " +
3340 " when plo.percon_9_10_c = dbo.percon.PerConID then plo.lotnum + '9-10' " +
3341 " else '' " +
3342 " end as SerialNo, " +
3343 " case when plo.percon_1_2_c = dbo.percon.PerConID then plo.PerCon_1_2_Notes_c " +
3344 " when plo.percon_3_4_c = dbo.percon.PerConID then plo.PerCon_3_4_Notes_c " +
3345 " when plo.percon_5_6_c = dbo.percon.PerConID then plo.PerCon_5_6_Notes_c " +
3346 " when plo.percon_7_8_c = dbo.percon.PerConID then plo.PerCon_7_8_Notes_c " +
3347 " when plo.percon_9_10_c = dbo.percon.PerConID then plo.PerCon_9_10_Notes_c " +
3348 " else '' " +
3349 " end as Notes, " +
3350 " plo.ExpirationDate as ExpirationDate, " +
3351 " plo.lotnum as ExistingCast " +
3352 " ,ml.MfgLoc" +
3353 " from dbo.percon with (nolock) " +
3354 " left outer join dbo.partlot as plo on plo.company = dbo.percon.company and plo.ExpirationDate > GetDate() and ( plo.percon_1_2_c = PerConID or plo.percon_3_4_c = PerConID or plo.percon_5_6_c = PerConID or plo.percon_7_8_c = PerConID or plo.percon_9_10_c = PerConID) " +
3355 " LEFT JOIN dbo.CPE_SLXLotNumMfgLoc ml ON ml.LotNum COLLATE SQL_Latin1_General_CP1250_CI_AS = plo.LotNum" +
3356 " where dbo.percon.company = ' ((Ice.Core.Session)oTrans.Session).CompanyID + ' and dbo.percon.LastName like ' edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row][PerConLastName_c].ToString() + %' and dbo.percon.FirstName like ' edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row][PerConFirstName_c].ToString() + %' order by dbo.percon.perconid, ExistingCast ;" ;
3357//MessageBox.Show("lastname= " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row][PerConLastName_c].ToString() + " firstname= " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row][PerConFirstName_c].ToString() + " company= " + ((Ice.Core.Session)oTrans.Session).CompanyID);
3358//MessageBox.Show(select);
3359*/
3360
3361 if ( ((Ice.Core.Session)oTrans.Session).CompanyID != "200" )
3362 {
3363//MessageBox.Show("2");
3364 select = " select pc.PerConID as PerConID, pc.FirstName, pc.LastName, pc.DOB_c as DOB, pc.EmployeeNum_c as EmployeeNum, pc.Comment, pc.CorpName as Company, " +
3365 " case when pl.percon_1_2_c = gpc.PerConID then " +
3366 " '1' " +
3367 " when pl.percon_3_4_c = gpc.PerConID then " +
3368 " '3' " +
3369 " when pl.percon_5_6_c = gpc.PerConID then " +
3370 " '5' " +
3371 " when pl.percon_7_8_c = gpc.PerConID then " +
3372 " '7' " +
3373 " when pl.percon_9_10_c = gpc.PerConID then " +
3374 " '9' " +
3375 " else " +
3376 " '' " +
3377 " end as RightMould, " +
3378 " case when pl.percon_1_2_c = gpc.PerConID then " +
3379 " '2' " +
3380 " when pl.percon_3_4_c = gpc.PerConID then " +
3381 " '4' " +
3382 " when pl.percon_5_6_c = gpc.PerConID then " +
3383 " '6' " +
3384 " when pl.percon_7_8_c = gpc.PerConID then " +
3385 " '8' " +
3386 " when pl.percon_9_10_c = gpc.PerConID then " +
3387 " '10' " +
3388 " else " +
3389 " '' " +
3390 " end as LeftMould, " +
3391 " case when pl.percon_1_2_c = gpc.PerConID then " +
3392 " pl.lotnum + '1-2' " +
3393 " when pl.percon_3_4_c = gpc.PerConID then " +
3394 " pl.lotnum + '3-4' " +
3395 " when pl.percon_5_6_c = gpc.PerConID then " +
3396 " pl.lotnum + '5-6' " +
3397 " when pl.percon_7_8_c = gpc.PerConID then " +
3398 " pl.lotnum + '7-8' " +
3399 " when pl.percon_9_10_c = gpc.PerConID then " +
3400 " pl.lotnum + '9-10' " +
3401 " else " +
3402 " '' " +
3403 " end as SerialNo, " +
3404 " case when pl.percon_1_2_c = gpc.PerConID then " +
3405 " pl.PerCon_1_2_Notes_c " +
3406 " when pl.percon_3_4_c = gpc.PerConID then " +
3407 " pl.PerCon_3_4_Notes_c " +
3408 " when pl.percon_5_6_c = gpc.PerConID then " +
3409 " pl.PerCon_5_6_Notes_c " +
3410 " when pl.percon_7_8_c = gpc.PerConID then " +
3411 " pl.PerCon_7_8_Notes_c " +
3412 " when pl.percon_9_10_c = gpc.PerConID then " +
3413 " pl.PerCon_9_10_Notes_c " +
3414 " else " +
3415 " '' " +
3416 " end as Notes , " +
3417 " pl.ExpirationDate as ExpirationDate, " +
3418 " pl.lotnum as ExistingCast " +
3419" ,ml.MfgLoc" +
3420 " from dbo.percon as pc with (nolock) " +
3421 " join erp.glbpercon as gpc on '200' = gpc.company and gpc.GlbCompany = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and gpc.glbperconid = pc.perconid " +
3422 " left outer join dbo.PartLot as pl with (nolock)on pl.company = gpc.company and pl.expirationdate > Getdate() and ( (pl.percon_1_2_c = gpc.PerConID and gpc.perconid > 0 ) or " +
3423 " ( pl.percon_3_4_c = gpc.PerConID and gpc.perconid > 0 ) or (pl.percon_5_6_c = gpc.PerConID and gpc.perconid > 0 ) or (pl.percon_7_8_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_9_10_c = gpc.PerConID and gpc.perconid > 0 )) " +
3424" LEFT JOIN dbo.CPE_SLXLotNumMfgLoc ml ON ml.LotNum COLLATE SQL_Latin1_General_CP1250_CI_AS = pl.LotNum" +
3425 " where pc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and pc.LastName = '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"].ToString() + "' and pc.FirstName = '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"].ToString() + "' order by pc.perconid, pl.lotnum";
3426
3427
3428 }
3429 // MessageBox.Show("1351");
3430 // txtQuery.Text += "1351***********************************************1351\n\n" + select;
3431//MessageBox.Show("1410");
3432 if ( LaunchSearch(select) )
3433 {
3434 //MessageBox.Show("3");
3435 select = " select PerConID as PerConID, FirstName, LastName, DOB_c as DOB, EmployeeNum_c as EmployeeNum, CorpName as Company, Comment," +
3436 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3437 " '1' " +
3438 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3439 " '3' " +
3440 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3441 " '5' " +
3442 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3443 " '7' " +
3444 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3445 " '9' " +
3446 " else " +
3447 " '' " +
3448 " end as RightMould, " +
3449 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3450 " '2' " +
3451 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3452 " '4' " +
3453 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3454 " '6' " +
3455 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3456 " '8' " +
3457 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3458 " '10' " +
3459 " else " +
3460 " '' " +
3461 " end as LeftMould, " +
3462" case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3463 " plo.lotnum + '1-2' " +
3464 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3465 " plo.lotnum + '3-4' " +
3466 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3467 " plo.lotnum + '5-6' " +
3468 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3469 " plo.lotnum + '7-8' " +
3470 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
3471 " plo.lotnum + '9-10' " +
3472 " else " +
3473 " '' " +
3474 " end as SerialNo " +
3475 " , case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3476" plo.PerCon_1_2_Notes_c " +
3477" when plo.percon_3_4_c = dbo.percon.PerConID then " +
3478" plo.PerCon_3_4_Notes_c " +
3479" when plo.percon_5_6_c = dbo.percon.PerConID then " +
3480" plo.PerCon_5_6_Notes_c " +
3481" when plo.percon_7_8_c = dbo.percon.PerConID then " +
3482" plo.PerCon_7_8_Notes_c " +
3483" when plo.percon_9_10_c = dbo.percon.PerConID then " +
3484" plo.PerCon_9_10_Notes_c " +
3485" else " +
3486" '' " +
3487" end " +
3488 " as Notes, " +
3489
3490 " plo.ExpirationDate as ExpirationDate, " +
3491 " plo.lotnum as ExistingCast " +
3492" ,ml.MfgLoc" +
3493" from dbo.percon with (nolock) " +
3494" left outer join dbo.partlot as plo on plo.company = dbo.percon.company and plo.ExpirationDate > GetDate() and ( plo.percon_1_2_c = PerConID or plo.percon_3_4_c = PerConID or plo.percon_5_6_c = PerConID or plo.percon_7_8_c = PerConID or plo.percon_9_10_c = PerConID) " +
3495" LEFT JOIN dbo.CPE_SLXLotNumMfgLoc ml ON ml.LotNum COLLATE SQL_Latin1_General_CP1250_CI_AS = plo.LotNum" +
3496 " where dbo.percon.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and dbo.percon.LastName like '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"].ToString() + "%' and dbo.percon.FirstName like '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"].ToString() + "%' order by dbo.percon.perconid, ExistingCast ";
3497
3498
3499 if ( ((Ice.Core.Session)oTrans.Session).CompanyID != "200" )
3500 {
3501//MessageBox.Show("4");
3502
3503 select = " select pc.PerConID as PerConID, pc.FirstName, pc.LastName, pc.DOB_c as DOB, pc.EmployeeNum_c as EmployeeNum, pc.Comment, pc.CorpName as Company, " +
3504 " case when pl.percon_1_2_c = gpc.PerConID then " +
3505" '1' " +
3506" when pl.percon_3_4_c = gpc.PerConID then " +
3507" '3' " +
3508" when pl.percon_5_6_c = gpc.PerConID then " +
3509" '5' " +
3510" when pl.percon_7_8_c = gpc.PerConID then " +
3511" '7' " +
3512" when pl.percon_9_10_c = gpc.PerConID then " +
3513" '9' " +
3514" else " +
3515" '' " +
3516" end as RightMould, " +
3517 " case when pl.percon_1_2_c = gpc.PerConID then " +
3518" '2' " +
3519" when pl.percon_3_4_c = gpc.PerConID then " +
3520" '4' " +
3521" when pl.percon_5_6_c = gpc.PerConID then " +
3522" '6' " +
3523" when pl.percon_7_8_c = gpc.PerConID then " +
3524" '8' " +
3525" when pl.percon_9_10_c = gpc.PerConID then " +
3526" '10' " +
3527" else " +
3528" '' " +
3529" end as LeftMould, " +
3530" case when pl.percon_1_2_c = gpc.PerConID then " +
3531" pl.lotnum + '1-2' " +
3532" when pl.percon_3_4_c = gpc.PerConID then " +
3533" pl.lotnum + '3-4' " +
3534" when pl.percon_5_6_c = gpc.PerConID then " +
3535" pl.lotnum + '5-6' " +
3536" when pl.percon_7_8_c = gpc.PerConID then " +
3537" pl.lotnum + '7-8' " +
3538" when pl.percon_9_10_c = gpc.PerConID then " +
3539" pl.lotnum + '9-10' " +
3540" else " +
3541" '' " +
3542" end as SerialNo, " +
3543" case when pl.percon_1_2_c = gpc.PerConID then " +
3544" pl.PerCon_1_2_Notes_c " +
3545" when pl.percon_3_4_c = gpc.PerConID then " +
3546" pl.PerCon_3_4_Notes_c " +
3547" when pl.percon_5_6_c = gpc.PerConID then " +
3548" pl.PerCon_5_6_Notes_c " +
3549" when pl.percon_7_8_c = gpc.PerConID then " +
3550" pl.PerCon_7_8_Notes_c " +
3551" when pl.percon_9_10_c = gpc.PerConID then " +
3552" pl.PerCon_9_10_Notes_c " +
3553" else " +
3554" '' " +
3555" end as Notes , " +
3556 " pl.ExpirationDate as ExpirationDate, " +
3557 " pl.lotnum as ExistingCast " +
3558
3559" ,ml.MfgLoc" +
3560
3561" from dbo.percon as pc with (nolock) " +
3562" join erp.glbpercon as gpc on '200' = gpc.company and gpc.GlbCompany = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and gpc.glbperconid = pc.perconid " +
3563" left outer join dbo.PartLot as pl with (nolock)on pl.company = gpc.company and pl.expirationdate > Getdate() and ( ( pl.percon_1_2_c = gpc.PerConID and gpc.perconid > 0 ) or " +
3564" ( pl.percon_3_4_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_5_6_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_7_8_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_9_10_c = gpc.PerConID and gpc.perconid > 0 ) ) " +
3565" LEFT JOIN dbo.CPE_SLXLotNumMfgLoc ml ON ml.LotNum COLLATE SQL_Latin1_General_CP1250_CI_AS = pl.LotNum" +
3566" where pc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and pc.LastName like '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"].ToString() + "%' and pc.FirstName like '" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"].ToString() + "%' order by pc.perconid, pl.lotnum";
3567
3568 }
3569 // MessageBox.Show("1480");
3570 // txtQuery.Text += "1480***********************************************1480\n\n" + select;
3571 if (LaunchSearch(select) )
3572 {
3573 MessageBox.Show("No contacts found with\nLastName starts or equal to:" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"].ToString() + "\nand FirstName starts or equal to:" + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"].ToString());
3574 }
3575 }
3576 }
3577
3578// MessageBox.Show("1548: Leaving Search_c press");
3579 }
3580 }
3581
3582 private void AddNewLine()
3583 {
3584 try
3585 {
3586 oTrans.GetNewOrderDtl();
3587 }catch ( Exception ex )
3588 {
3589 MessageBox.Show("AddNewLine error : " + ex.Message);
3590 }
3591 }
3592 private void CopyFromPrevious(bool bCopyContact)
3593 {
3594
3595 try
3596 {
3597
3598
3599 if ( edvOrderDtl.Row > 0 )
3600 {
3601 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["RowMod"].ToString() == "A" )
3602 {
3603 m_copying = true;
3604 foreach ( DataColumn column in edvOrderDtl.dataView.Table.Columns )
3605 {
3606 if ( m_hashCopyColumns.Contains(column.ColumnName.ToLower()))
3607 {
3608 if ( bCopyContact == false && ( column.ColumnName.ToLower().StartsWith("percon") || column.ColumnName.ToLower().StartsWith("employeenum_c")) )
3609 {
3610 }
3611 else if ( bCopyContact == false && ( column.ColumnName.ToLower() == "cpe_mouldright_c" || column.ColumnName.ToLower() == "cpe_mouldleft_c" || column.ColumnName.ToLower() == "cpe_cast_c" ))
3612 {
3613 }
3614 else
3615 {
3616 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row][column.ColumnName] = edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row - 1][column.ColumnName];
3617 }
3618 }
3619 }
3620 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["DocUnitPrice"] = edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row - 1]["DocUnitPrice"];
3621 m_copying = false;
3622 }
3623 }
3624 }catch ( Exception ex )
3625 {
3626 MessageBox.Show("Copy from previous error: " + ex.Message);
3627 }
3628 }
3629
3630# region SearchDialog
3631 public class ContactSearch : Form
3632 {
3633 public string columnName;
3634 public string selectedValue;
3635 public bool m_bSelected;
3636 public string m_server;
3637 public string m_user;
3638 public string m_password;
3639 public string m_dataBase;
3640 public string m_select;
3641 public bool m_multiSelect;
3642 public DataTable m_dtSelected;
3643 public DataTable m_dtResults;
3644
3645
3646 private System.Windows.Forms.Button btnSelect;
3647 private System.Windows.Forms.Button btnCancel;
3648 private System.Windows.Forms.DataGridView dataGridView1;
3649 private System.ComponentModel.IContainer components = null;
3650
3651
3652 public ContactSearch(string title )
3653 {
3654 InitializeComponent();
3655
3656 m_dtSelected = new DataTable();
3657
3658 this.Text = title;
3659
3660 }
3661
3662
3663 public bool InitSearch(string server, string database, string password, string user, string select, bool multiselect, out bool nothingFound, bool newRow, out string oneRecord)
3664 {
3665 oneRecord = "";
3666 nothingFound = false;
3667 m_bSelected = false;
3668 m_server = server;
3669 m_password = password;
3670 m_user = user;
3671 m_dataBase = database;
3672 m_select = select;
3673 m_multiSelect = multiselect;
3674 dataGridView1.MultiSelect = multiselect;
3675
3676 return LoadGrid(out nothingFound, out oneRecord, newRow);
3677 }
3678 protected override void Dispose(bool disposing)
3679 {
3680 m_dtSelected.Dispose();
3681 m_dtSelected = null;
3682 if (disposing && (components != null))
3683 {
3684 components.Dispose();
3685 }
3686 base.Dispose(disposing);
3687 }
3688 private void InitializeComponent()
3689 {
3690 this.btnSelect = new System.Windows.Forms.Button();
3691 this.btnCancel = new System.Windows.Forms.Button();
3692 this.dataGridView1 = new System.Windows.Forms.DataGridView();
3693 ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
3694 this.SuspendLayout();
3695 //
3696 // btnSelect
3697 //
3698 this.btnSelect.Location = new System.Drawing.Point(12, 192);
3699 this.btnSelect.Name = "btnSelect";
3700 this.btnSelect.Size = new System.Drawing.Size(117, 26);
3701 this.btnSelect.TabIndex = 0;
3702 this.btnSelect.Text = "Select";
3703 this.btnSelect.UseVisualStyleBackColor = true;
3704 this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
3705 //
3706 // btnCancel
3707 //
3708 this.btnCancel.Location = new System.Drawing.Point(135, 192);
3709 this.btnCancel.Name = "btnCancel";
3710 this.btnCancel.Size = new System.Drawing.Size(117, 26);
3711 this.btnCancel.TabIndex = 1;
3712 this.btnCancel.Text = "Cancel";
3713 this.btnCancel.UseVisualStyleBackColor = true;
3714 this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
3715 //
3716 // dataGridView1
3717 //
3718 this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
3719 this.dataGridView1.Location = new System.Drawing.Point(12, 12);
3720 this.dataGridView1.Name = "dataGridView1";
3721 this.dataGridView1.Size = new System.Drawing.Size(840, 174);
3722 this.dataGridView1.TabIndex = 2;
3723 this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
3724 this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
3725 this.dataGridView1.Anchor = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
3726 //
3727 // Form1
3728 //
3729 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
3730 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
3731 this.ClientSize = new System.Drawing.Size(860, 230);
3732 this.Controls.Add(this.dataGridView1);
3733 this.Controls.Add(this.btnCancel);
3734 this.Controls.Add(this.btnSelect);
3735 this.Name = "Form1";
3736 this.Text = "Person / Contact";
3737 this.Load += new System.EventHandler(this.Form1_Load);
3738 ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
3739 this.ResumeLayout(false);
3740
3741 }
3742 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
3743 {
3744
3745 }
3746
3747 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
3748 {
3749 m_dtSelected = ((DataTable)dataGridView1.DataSource).Clone();
3750 DataRow row = ((DataRowView)dataGridView1.Rows[e.RowIndex].DataBoundItem).Row;
3751 m_dtSelected.ImportRow(row);
3752 m_bSelected = true;
3753 //MessageBox.Show(m_dtSelected.Rows[0][0].ToString());
3754 this.Close();
3755 }
3756
3757 private bool LoadGrid(out bool nothingFound, out string oneRecord, bool newRow)
3758 {
3759 bool bHasResults = false;
3760 nothingFound = false;
3761 oneRecord = "";
3762 try
3763 {
3764 dataGridView1.DataSource = null;
3765 m_dtResults = SQLExecuteSelect(m_select);
3766 if ( m_dtResults.Rows.Count > 0 )
3767 {
3768 if ( m_dtResults.Rows.Count == 1 )
3769 {
3770 oneRecord = m_dtResults.Rows[0][0].ToString();
3771
3772
3773 }
3774 if ( newRow )
3775 {
3776 DataRow theNewRow = m_dtResults.NewRow();
3777 theNewRow[0] = "New";
3778 for ( int index = 1; index < m_dtResults.Columns.Count; ++index )
3779 {
3780 try{
3781 theNewRow[index] = "";
3782 }catch {
3783 try
3784 {
3785 theNewRow[index] = 0;
3786 }catch{}
3787 }
3788 }
3789
3790 m_dtResults.Rows.Add(theNewRow);
3791 }
3792 bHasResults = true;
3793 dataGridView1.DataSource = m_dtResults;
3794 dataGridView1.Rows[0].Selected = true;
3795 }
3796 else
3797 {
3798 nothingFound = true;
3799 }
3800
3801 }
3802 catch(Exception ex)
3803 {
3804 MessageBox.Show("LoadGrid error: " + ex.Message);
3805 }
3806
3807 return bHasResults;
3808 }
3809 private void Form1_Load(object sender, EventArgs e)
3810 {
3811
3812 dataGridView1.AllowUserToAddRows = false;
3813 dataGridView1.ReadOnly = true;
3814
3815 m_bSelected = false;
3816
3817 }
3818
3819
3820
3821 private void btnCancel_Click(object sender, EventArgs e)
3822 {
3823 this.Close();
3824 }
3825
3826 private void btnSelect_Click(object sender, EventArgs e)
3827 {
3828//MessageBox.Show("btnSelect_Click: 1797");
3829 if (dataGridView1.SelectedRows.Count > 0)
3830 {
3831
3832 m_dtSelected = ((DataTable)dataGridView1.DataSource).Clone();
3833 for (int index = 0; index < dataGridView1.SelectedRows.Count; ++index )
3834 {
3835 DataRow row = ((DataRowView)dataGridView1.SelectedRows[index].DataBoundItem).Row;
3836 m_dtSelected.ImportRow(row);
3837 m_bSelected = true;
3838
3839 }
3840 /*string id = "\n";
3841 foreach (DataRow row in m_dtSelected.Rows)
3842 {
3843 id += row[0].ToString() + "\n";
3844 }
3845 MessageBox.Show(id);*/
3846 this.Close();
3847 }
3848 else{
3849 MessageBox.Show("Nothing selected.");
3850 }
3851 }
3852
3853 private System.Data.SqlClient.SqlConnection GetSQLConnection()
3854 {
3855 try
3856 {
3857
3858 System.Data.SqlClient.SqlConnection SQLCon = new System.Data.SqlClient.SqlConnection();
3859 string timeout = "3000";
3860 string connectionString = "Persist Security Info=false;Integrated Security=false;database=" + m_dataBase + ";User ID=" + m_user + ";password=" + m_password + ";server=" + m_server + ";Connect Timeout=" + timeout;
3861 SQLCon.ConnectionString = connectionString;
3862 SQLCon.Open();
3863 return SQLCon;
3864 }
3865 catch (Exception ex)
3866 {
3867 MessageBox.Show("GetSQLConnection error: " + ex.Message);
3868 }
3869 return null;
3870
3871 }
3872 private DataTable SQLExecuteSP(string storedProcedure, System.Collections.Hashtable parameters)
3873 {
3874
3875 DataTable dt = new DataTable();
3876 try
3877 {
3878 System.Data.SqlClient.SqlConnection SQLCon = GetSQLConnection();
3879
3880 System.Data.SqlClient.SqlCommand SQLCmd = new System.Data.SqlClient.SqlCommand();
3881 SQLCmd.CommandText = storedProcedure;
3882 SQLCmd.CommandType = CommandType.StoredProcedure;
3883 SQLCmd.CommandTimeout = 90;
3884 SQLCmd.Connection = SQLCon;
3885
3886 foreach (System.Collections.DictionaryEntry dic in parameters)
3887 {
3888 SQLCmd.Parameters.AddWithValue(dic.Key.ToString(), dic.Value.ToString());
3889 }
3890
3891
3892
3893 //SQLCmd.Parameters("TotPcs").Direction = ParameterDirection.Output
3894
3895 System.Data.SqlClient.SqlDataReader reader = SQLCmd.ExecuteReader();
3896 dt.Load(reader);
3897
3898 SQLCmd.Dispose();
3899 reader.Dispose();
3900 SQLCmd = null;
3901 reader = null;
3902 DisconnectCon(SQLCon);
3903 }
3904 catch (Exception ex)
3905 {
3906 MessageBox.Show("Stored Procedure error " + ex.Message + "\n\n" + storedProcedure);
3907 }
3908 return dt;
3909 }
3910
3911 private void SQLExecuteNonQuery(string bigUpdate)
3912 {
3913 try
3914 {
3915 System.Data.SqlClient.SqlConnection SQLCon = GetSQLConnection();
3916 string sqlStatement = bigUpdate;
3917 System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sqlStatement, SQLCon);
3918 System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader();
3919 DisconnectCon(SQLCon);
3920 }
3921 catch (Exception ex)
3922 {
3923 MessageBox.Show("SQLExecuteNonQuery error: " + ex.Message + "\n" + bigUpdate);
3924 }
3925 }
3926
3927 private DataTable SQLExecuteSelect(string selectStatement)
3928 {
3929 DataTable dt = new DataTable();
3930 try
3931 {
3932 System.Data.SqlClient.SqlConnection SQLCon = GetSQLConnection();
3933 System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(selectStatement, SQLCon);
3934 command.CommandTimeout = 90;
3935 System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader();
3936 dt.Load(reader);
3937 DisconnectCon(SQLCon);
3938 // set readonly = false
3939 foreach (DataColumn col in dt.Columns)
3940 {
3941 col.ReadOnly = false;
3942 }
3943 }
3944 catch (Exception ex)
3945 {
3946 MessageBox.Show("Select statement error " + ex.Message + "\n\n" + selectStatement);
3947 }
3948 return dt;
3949 }
3950
3951 private void DisconnectCon(System.Data.SqlClient.SqlConnection SQLCon)
3952 {
3953 try
3954 {
3955 SQLCon.Close();
3956 SQLCon = null;
3957 }
3958 catch (Exception ex)
3959 {
3960 }
3961
3962 }
3963
3964 }
3965# endregion SearchDialog
3966
3967
3968 private void grdDtlList_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs args)
3969 {
3970 try
3971 {
3972 string searchType = "Auto3";
3973 try
3974 {
3975 searchType = cmbSearchType.Value.ToString();
3976 }catch{}
3977
3978 if ( searchType == "Auto3" )
3979 {
3980 if ( args.Cell.Column.Key == "PerConLastName_c" )
3981 {
3982
3983 if ( args.Cell.Text.Length == 3 )
3984 {
3985 args.Cell.Row.Cells["PerConFirstName_c"].Value = "";
3986 args.Cell.Row.Cells["PerConDOB_c"].Value = System.DBNull.Value;
3987 args.Cell.Row.Cells["EmployeeNum_c"].Value = "";
3988
3989
3990 string select = " select PerConID as PerConID, FirstName, LastName, DOB_c as DOB, EmployeeNum_c as EmployeeNum, Comment, CorpName as Company, " +
3991 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
3992 " '1' " +
3993 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
3994 " '3' " +
3995 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
3996 " '5' " +
3997 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
3998 " '7' " +
3999 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
4000 " '9' " +
4001 " else " +
4002 " '' " +
4003 " end as RightMould, " +
4004 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4005 " '2' " +
4006 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
4007 " '4' " +
4008 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
4009 " '6' " +
4010 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
4011 " '8' " +
4012 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
4013 " '10' " +
4014 " else " +
4015 " '' " +
4016 " end as LeftMould, " +
4017" case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4018 " plo.lotnum + '1-2' " +
4019 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
4020 " plo.lotnum + '3-4' " +
4021 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
4022 " plo.lotnum + '5-6' " +
4023 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
4024 " plo.lotnum + '7-8' " +
4025 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
4026 " plo.lotnum + '9-10' " +
4027 " else " +
4028 " '' " +
4029 " end as SerialNo, " +
4030 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4031" plo.PerCon_1_2_Notes_c " +
4032" when plo.percon_3_4_c = dbo.percon.PerConID then " +
4033" plo.PerCon_3_4_Notes_c " +
4034" when plo.percon_5_6_c = dbo.percon.PerConID then " +
4035" plo.PerCon_5_6_Notes_c " +
4036" when plo.percon_7_8_c = dbo.percon.PerConID then " +
4037" plo.PerCon_7_8_Notes_c " +
4038" when plo.percon_9_10_c = dbo.percon.PerConID then " +
4039" plo.PerCon_9_10_Notes_c " +
4040" else " +
4041" '' " +
4042" end " +
4043 " as Notes, " +
4044
4045 " plo.ExpirationDate as ExpirationDate, " +
4046 " plo.lotnum as ExistingCast " +
4047" from dbo.percon with (nolock) " +
4048" left outer join dbo.partlot as plo on plo.company = dbo.percon.company and plo.ExpirationDate > GetDate() and ( plo.percon_1_2_c = PerConID or plo.percon_3_4_c = PerConID or plo.percon_5_6_c = PerConID or plo.percon_7_8_c = PerConID or plo.percon_9_10_c = PerConID) " +
4049 " where dbo.percon.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and dbo.percon.LastName like '" + args.Cell.Text + "%' order by dbo.percon.perconid, ExistingCast ";
4050
4051
4052 if ( ((Ice.Core.Session)oTrans.Session).CompanyID != "200" )
4053 {
4054
4055 select = " select pc.PerConID as PerConID, pc.FirstName, pc.LastName, pc.DOB_c as DOB, pc.EmployeeNum_c as EmployeeNum, pc.Comment, pc.CorpName as Company, " +
4056
4057" case when pl.percon_1_2_c = gpc.PerConID then " +
4058" '1' " +
4059" when pl.percon_3_4_c = gpc.PerConID then " +
4060" '3' " +
4061" when pl.percon_5_6_c = gpc.PerConID then " +
4062" '5' " +
4063" when pl.percon_7_8_c = gpc.PerConID then " +
4064" '7' " +
4065" when pl.percon_9_10_c = gpc.PerConID then " +
4066" '9' " +
4067" else " +
4068" '' " +
4069" end as RightMould, " +
4070 " case when pl.percon_1_2_c = gpc.PerConID then " +
4071" '2' " +
4072" when pl.percon_3_4_c = gpc.PerConID then " +
4073" '4' " +
4074" when pl.percon_5_6_c = gpc.PerConID then " +
4075" '6' " +
4076" when pl.percon_7_8_c = gpc.PerConID then " +
4077" '8' " +
4078" when pl.percon_9_10_c = gpc.PerConID then " +
4079" '10' " +
4080" else " +
4081" '' " +
4082" end as LeftMould, " +
4083" case when pl.percon_1_2_c = gpc.PerConID then " +
4084" pl.lotnum + '1-2' " +
4085" when pl.percon_3_4_c = gpc.PerConID then " +
4086" pl.lotnum + '3-4' " +
4087" when pl.percon_5_6_c = gpc.PerConID then " +
4088" pl.lotnum + '5-6' " +
4089" when pl.percon_7_8_c = gpc.PerConID then " +
4090" pl.lotnum + '7-8' " +
4091" when pl.percon_9_10_c = gpc.PerConID then " +
4092" pl.lotnum + '9-10' " +
4093" else " +
4094" '' " +
4095" end as SerialNo, " +
4096" case when pl.percon_1_2_c = gpc.PerConID then " +
4097" pl.PerCon_1_2_Notes_c " +
4098" when pl.percon_3_4_c = gpc.PerConID then " +
4099" pl.PerCon_3_4_Notes_c " +
4100" when pl.percon_5_6_c = gpc.PerConID then " +
4101" pl.PerCon_5_6_Notes_c " +
4102" when pl.percon_7_8_c = gpc.PerConID then " +
4103" pl.PerCon_7_8_Notes_c " +
4104" when pl.percon_9_10_c = gpc.PerConID then " +
4105" pl.PerCon_9_10_Notes_c " +
4106" else " +
4107" '' " +
4108" end as Notes , " +
4109 " pl.ExpirationDate as ExpirationDate, " +
4110 " pl.lotnum as ExistingCast " +
4111" from dbo.percon as pc with (nolock) " +
4112" join erp.glbpercon as gpc on '200' = gpc.company and gpc.GlbCompany = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and gpc.glbperconid = pc.perconid " +
4113" left outer join dbo.PartLot as pl with (nolock)on pl.company = gpc.company and pl.expirationdate > Getdate() and ( ( pl.percon_1_2_c = gpc.PerConID and gpc.perconid > 0 ) or " +
4114" ( pl.percon_3_4_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_5_6_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_7_8_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_9_10_c = gpc.PerConID and gpc.perconid > 0 ) ) " +
4115" where pc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and pc.LastName like '" + args.Cell.Text + "%' order by pc.perconid, pl.lotnum";
4116 }
4117 // MessageBox.Show("2025");
4118 // txtQuery.Text += "2025***********************************************2025\n\n" + select;
4119 LaunchSearch(select);
4120
4121 }
4122 }
4123 }
4124 }catch ( Exception ex )
4125 {
4126 MessageBox.Show("Cell change error: " + ex.Message);
4127 }
4128 }
4129 private bool LaunchSearch(string select)
4130 {
4131 return LaunchSearch(select, true);
4132 }
4133
4134
4135 private bool LaunchSearch(string select, bool bAlwaysShow)
4136 {
4137
4138 txtQuery.Text = select;
4139 bool nothingFound = false;
4140 try
4141 {
4142 string oneRow = "";
4143 //ENV
4144 if (m_ContactSearch.InitSearch("CPE-ERPSQL", "erp1016CRP", "Ep1c0rViews", "EpicorViews", select, false, out nothingFound, false, out oneRow))
4145 {
4146 if ( string.IsNullOrEmpty(oneRow) || bAlwaysShow )
4147 {
4148 m_ContactSearch.ShowDialog();
4149 }
4150 else if ( bAlwaysShow == false )
4151 {
4152 m_ContactSearch.m_bSelected = true;
4153
4154 }
4155 if ( m_ContactSearch.m_bSelected )
4156 {
4157
4158 grdDtlList.ActiveCell = grdDtlList.ActiveRow.Cells["PartNum"];
4159 grdDtlList.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, false, false);
4160 int perConID = Convert.ToInt32(m_ContactSearch.m_dtSelected.Rows[0]["PerConID"]);
4161
4162
4163 //greg - percon has been selected. Query to see if there's any comments on the contact and show in messagebox if so.
4164 //string select2 = "SELECT Comment FROM ERP.PerCon pc WHERE pc.Company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' AND pc.PerConID = " + perConID;
4165 if ( m_ContactSearch.m_dtSelected.Rows[0]["Comment"] != System.DBNull.Value )
4166 {
4167 string temp = m_ContactSearch.m_dtSelected.Rows[0]["Comment"].ToString();
4168 if ( !string.IsNullOrEmpty(temp) )
4169 {
4170 MessageBox.Show("LaunchSearch error: " + temp);
4171 }
4172 }
4173
4174
4175 if ( m_ContactSearch.m_dtSelected.Rows[0]["LastName"] != System.DBNull.Value )
4176 {
4177 if (edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"].ToString() != m_ContactSearch.m_dtSelected.Rows[0]["LastName"].ToString())
4178 {
4179 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConLastName_c"] = m_ContactSearch.m_dtSelected.Rows[0]["LastName"].ToString();
4180 }
4181
4182 }
4183 if ( m_ContactSearch.m_dtSelected.Rows[0]["FirstName"] != System.DBNull.Value )
4184 {
4185
4186 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"].ToString() != m_ContactSearch.m_dtSelected.Rows[0]["FirstName"].ToString().ToString() )
4187 {
4188 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConFirstName_c"] = m_ContactSearch.m_dtSelected.Rows[0]["FirstName"].ToString();
4189 }
4190
4191 }
4192
4193
4194
4195 if ( m_ContactSearch.m_dtSelected.Rows[0]["DOB"] != System.DBNull.Value )
4196 {
4197 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConDOB_c"].ToString() != (m_ContactSearch.m_dtSelected.Rows[0]["DOB"]).ToString() )
4198 {
4199 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConDOB_c"] = (m_ContactSearch.m_dtSelected.Rows[0]["DOB"]);
4200 }
4201
4202 }
4203
4204 if ( m_ContactSearch.m_dtSelected.Rows[0]["EmployeeNum"] != System.DBNull.Value )
4205 {
4206 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["EmployeeNum_c"].ToString() != (m_ContactSearch.m_dtSelected.Rows[0]["EmployeeNum"]).ToString() )
4207 {
4208 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["EmployeeNum_c"] = (m_ContactSearch.m_dtSelected.Rows[0]["EmployeeNum"]);
4209 }
4210
4211 }
4212
4213 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"].ToString() != (m_ContactSearch.m_dtSelected.Rows[0]["Company"]).ToString() )
4214 {
4215 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerConCorpName_c"] = (m_ContactSearch.m_dtSelected.Rows[0]["Company"]);
4216 }
4217
4218 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() != perConID.ToString() )
4219 {
4220 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"] = perConID;
4221 }
4222 if ( edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PartNum"].ToString().EndsWith("R") )
4223 {
4224 string newselect = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', " +
4225 " case when PerCon_1_2_c = " + perConID.ToString() + " then '1' when PerCon_3_4_c = " + perConID.ToString() + " then '3' when PerCon_5_6_c = " + perConID.ToString() + " then '5' when PerCon_7_8_c = " + perConID.ToString() + " then '7' when PerCon_9_10_c = " + perConID.ToString() + " then '9' else '' end as RightMould, " +
4226 " case when PerCon_1_2_c = " + perConID.ToString() + " then '2' when PerCon_3_4_c = " + perConID.ToString() + " then '4' when PerCon_5_6_c = " + perConID.ToString() + " then '6' when PerCon_7_8_c = " + perConID.ToString() + " then '8' when PerCon_9_10_c = " + perConID.ToString() + " then '10' else '' end as LeftMould, " +
4227 " case when PerCon_1_2_c = " + perConID.ToString() + " then lotnum + '1-2' when PerCon_3_4_c = " + perConID.ToString() + " then lotnum + '3-4' when PerCon_5_6_c = " + perConID.ToString() + " then lotnum + '5-6' when PerCon_7_8_c = " + perConID.ToString() + " then lotnum + '7-8' when PerCon_9_10_c = " + perConID.ToString() + " then lotnum + '9-10' else '' end as SerialNo, " +
4228 " case when PerCon_1_2_c = " + perConID.ToString() + " then PerCon_1_2_Notes_c when PerCon_3_4_c = " + perConID.ToString() + " then PerCon_3_4_Notes_c when PerCon_5_6_c = " + perConID.ToString() + " then PerCon_5_6_Notes_c when PerCon_7_8_c = " + perConID.ToString() + " then PerCon_7_8_Notes_c when PerCon_9_10_c = " + perConID.ToString() + " then PerCon_9_10_Notes_c else '' end as Notes from dbo.partlot where company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and expirationdate > GETDATE() and ( PerCon_1_2_c = " + perConID.ToString() + " or PerCon_3_4_c = " + perConID.ToString() + " or PerCon_5_6_c = " + perConID.ToString() +" or PerCon_7_8_c = " + perConID.ToString() +" or PerCon_9_10_c = " + perConID.ToString() + ")";
4229 // "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date' from erp.partlot where company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and lotnum in (select distinct(pl.lotnum) from erp.partlot as pl with (nolock) join dbo.PlantConfCtrl as pcc with (nolock) on pl.company = pcc.company and pl.partnum = pcc.CastPartNum_c and pcc.plant = '" + ((Ice.Core.Session)oTrans.Session).PlantID + "' and pcc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' join dbo.orderdtl as od with (nolock) on od.company = pl.company and pl.lotnum = od.CPE_Cast_c join dbo.PerCon as pc with (nolock) on pc.company = od.company and pc.PerConID = od.PerCon_c where pc.PerConID = " + perConID.ToString() + " and pl.expirationdate > GETDATE())";
4230 if ( ((Ice.Core.Session)oTrans.Session).CompanyID == "250" )
4231 {
4232 select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', " +
4233 " case when PerCon_1_2_c = glb.perconid then '1' when PerCon_3_4_c = glb.perconid then '3' when PerCon_5_6_c = glb.perconid then '5' when PerCon_7_8_c = glb.perconid then '7' when PerCon_9_10_c = glb.perconid then '9' else '' end as RightMould, " +
4234 " case when PerCon_1_2_c = glb.perconid then '2' when PerCon_3_4_c = glb.perconid then '4' when PerCon_5_6_c = glb.perconid then '6' when PerCon_7_8_c = glb.perconid then '8' when PerCon_9_10_c = glb.perconid then '10' else '' end as LeftMould, " +
4235 " case when PerCon_1_2_c = glb.perconid then lotnum + '1-2' when PerCon_3_4_c = glb.perconid then lotnum + '3-4' when PerCon_5_6_c = glb.perconid then lotnum + '5-6' when PerCon_7_8_c = glb.perconid then lotnum + '7-8' when PerCon_9_10_c = glb.perconid then lotnum + '9-10' else '' end as SerialNo, " +
4236 " case when PerCon_1_2_c = glb.perconid then PerCon_1_2_Notes_c when PerCon_3_4_c = glb.perconid then PerCon_3_4_Notes_c when PerCon_5_6_c = glb.perconid then PerCon_5_6_Notes_c when PerCon_7_8_c = glb.perconid then PerCon_7_8_Notes_c when PerCon_9_10_c = glb.perconid then PerCon_9_10_Notes_c else '' end as Notes from dbo.partlot as pl with (nolock) join erp.glbpercon as glb with (nolock) on pl.company = glb.company and glb.glbperconid = " + perConID.ToString() + " and ( pl.PerCon_1_2_c = glb.perconid or pl.PerCon_3_4_c = glb.perconid or pl.PerCon_5_6_c = glb.perconid or pl.PerCon_7_8_c = glb.perconid or pl.PerCon_9_10_c = glb.perconid ) where pl.company = '200' and expirationdate > GETDATE() ";
4237 }
4238 // MessageBox.Show("2138");
4239 //txtQuery.Text = select;
4240 LaunchCastSearch(newselect, false);
4241 }
4242
4243 }
4244 }
4245 } catch ( Exception ex )
4246 {
4247 MessageBox.Show("Launch Search error: " + ex.Message + "\n\n" + select);
4248 }
4249 return nothingFound;
4250 }
4251
4252 private bool LaunchCastSearch(string select, bool bAlwaysShow)
4253 {
4254 txtQuery.Text = select;
4255 bool nothingFound = false;
4256 try
4257 {
4258 string oneCastNum = "";
4259 string salesUM = edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["SalesUM"].ToString().Trim().ToLower();
4260 //ENV
4261 if (m_CastSearch.InitSearch("CPE-ERPSQL", "erp1016CRP", "Ep1c0rViews", "EpicorViews", select, false, out nothingFound, true, out oneCastNum) )
4262 {
4263
4264 if ( string.IsNullOrEmpty(oneCastNum) || bAlwaysShow )
4265 {
4266
4267 m_CastSearch.ShowDialog();
4268 if ( m_CastSearch.m_bSelected )
4269 {
4270
4271 grdDtlList.ActiveCell = grdDtlList.ActiveRow.Cells["PartNum"];
4272 grdDtlList.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, false, false);
4273 string castNum = Convert.ToString(m_CastSearch.m_dtSelected.Rows[0]["Cast_Number"]);
4274 string leftMould = Convert.ToString(m_CastSearch.m_dtSelected.Rows[0]["leftMould"]);
4275 string rightMould = Convert.ToString(m_CastSearch.m_dtSelected.Rows[0]["rightMould"]);
4276 if ( castNum.ToLower() == "new" )
4277 {
4278 castNum = "";
4279 leftMould = "";
4280 rightMould = "";
4281 }
4282 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_Cast_c"] = castNum;
4283 if ( salesUM == "pr" || salesUM == "right" || salesUM == "ea" )
4284 {
4285 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldRight_c"] = rightMould;
4286 }
4287 if ( salesUM == "pr" || salesUM == "left" || salesUM == "ea" )
4288 {
4289 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldLeft_c"] = leftMould;
4290 }
4291 }
4292 }
4293 else if (! string.IsNullOrEmpty(oneCastNum) )
4294 {
4295 try{
4296 string leftMould = Convert.ToString(m_CastSearch.m_dtResults.Rows[0]["leftMould"]);
4297 string rightMould = Convert.ToString(m_CastSearch.m_dtResults.Rows[0]["rightMould"]);
4298 if ( salesUM == "pr" || salesUM == "right" || salesUM == "ea" )
4299 {
4300 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldRight_c"] = rightMould;
4301 }
4302 if ( salesUM == "pr" || salesUM == "left" || salesUM == "ea" )
4303 {
4304 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldLeft_c"] = leftMould;
4305 }
4306
4307 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_MouldRight_c"] = rightMould;
4308
4309 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_MouldLeft_c"] = leftMould;}catch{}
4310 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_Cast_c"] = oneCastNum;
4311 }
4312
4313 }
4314 else
4315 {
4316 try{
4317 string leftMould = Convert.ToString(m_CastSearch.m_dtResults.Rows[0]["leftMould"]);
4318 string rightMould = Convert.ToString(m_CastSearch.m_dtResults.Rows[0]["rightMould"]);
4319 if ( salesUM == "pr" || salesUM == "right" || salesUM == "ea" )
4320 {
4321 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldRight_c"] = rightMould;
4322 }
4323 if ( salesUM == "pr" || salesUM == "left" || salesUM == "ea" )
4324 {
4325 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldLeft_c"] = leftMould;
4326 }
4327 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_MouldRight_c"] = rightMould;
4328 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_MouldLeft_c"] = leftMould;}catch{}
4329 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_Cast_c"] = oneCastNum;
4330 }
4331 } catch ( Exception ex )
4332 {
4333 MessageBox.Show("Launch Cast Search error: " + ex.Message);
4334 }
4335 return nothingFound;
4336 }
4337
4338 private void grdDtlList_BeforeCellListDropDown(object sender, Infragistics.Win.UltraWinGrid.CancelableCellEventArgs args)
4339 {
4340 return;
4341 //try
4342 // {
4343 // if ( args.Cell.Column.Key == "SalesUM" )
4344 // {
4345 //
4346 // Infragistics.Win.ValueList theList = new Infragistics.Win.ValueList();
4347 // System.Collections.Hashtable parameters = new System.Collections.Hashtable();
4348 // parameters.Add("ppartnum", edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PartNum"].ToString() );
4349 //
4350 // DataTable dt = GetQueryData("CPEPartUOMClass", parameters);
4351 //
4352 // string uomClassID = "";
4353 // bool bAll = false;
4354 // if ( dt.Rows.Count > 0 )
4355 // {
4356 // uomClassID = dt.Rows[0]["Calculated_Filter"].ToString().ToUpper();
4357 // }
4358 // else
4359 // {
4360 // bAll = true;
4361 // }
4362 //
4363 // foreach (DataRow row in m_dtSalesUM.Rows )
4364 // {
4365 // if ( row["Calculated_Filter"].ToString().ToUpper() == uomClassID || bAll)
4366 // {
4367 // theList.ValueListItems.Add(row["Calculated_Display"].ToString(), row["Calculated_Value"].ToString());
4368 // }
4369 // }
4370 //
4371 // grdDtlList.DisplayLayout.Bands[0].Columns["SalesUM"].ValueList = theList;
4372 //
4373 //
4374 // }
4375 // }
4376 // catch ( Exception ex )
4377 // {
4378 // MessageBox.Show("Before cell dropdown error: " + ex.Message);
4379 // }
4380
4381 }
4382
4383 private void OrderHed_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
4384 {
4385 // ** Argument Properties and Uses **
4386 // args.Row["FieldName"]
4387 // args.Column, args.ProposedValue, args.Row
4388 // Add Event Handler Code
4389 switch (args.Column.ColumnName)
4390 {
4391 case "OrderSite_c":
4392
4393 break;
4394 case "HeaderPriceList_c":
4395 // set price list from header
4396 if ( !string.IsNullOrEmpty(args.Row["HeaderPriceList_c"].ToString()) )
4397 {
4398 oTrans.Update();
4399 foreach ( DataRow row in edvOrderDtl.dataView.Table.Rows )
4400 {
4401 row["OverridePriceList"] = true;
4402 row["BreakListCode"] = args.Row["HeaderPriceList_c"];
4403 }
4404 oTrans.Update();
4405 oTrans.Refresh();
4406 }
4407 break;
4408 }
4409 }
4410
4411 private void edvOrderRel_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
4412 {
4413 // ** Argument Properties and Uses **
4414 // view.dataView[args.Row]["FieldName"]
4415 // args.Row, args.Column, args.Sender, args.NotifyType
4416 // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
4417 if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
4418 {
4419 if ((args.Row > -1))
4420 {
4421 }
4422 }
4423 }
4424
4425 private void OrderHed_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
4426 {
4427 // ** Argument Properties and Uses **
4428 // args.Row["FieldName"]
4429 // args.Column, args.ProposedValue, args.Row
4430 // Add Event Handler Code
4431 switch (args.Column.ColumnName)
4432 {
4433 case "OrderSite_c":
4434 if ( edvOrderRel.dataView.Table.Rows.Count > 0 )
4435 {
4436 MessageBox.Show("Changing the Order Site will not update existing order line release site values.");
4437 }
4438 break;
4439 }
4440 }
4441
4442 private void cmbSearchType_ValueChanged(object sender, System.EventArgs args)
4443 {
4444 try
4445 {
4446 if ( cmbSearchType.Value.ToString() == "Auto3" )
4447 {
4448 grdDtlList.DisplayLayout.Bands[0].Columns["Search_c"].Hidden = true;
4449 }
4450 else
4451 {
4452 grdDtlList.DisplayLayout.Bands[0].Columns["Search_c"].Hidden = false;
4453 }
4454
4455 }
4456 catch {}
4457 }
4458
4459 private void edvOrderHed_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
4460 {
4461 // ** Argument Properties and Uses **
4462 // view.dataView[args.Row]["FieldName"]
4463 // args.Row, args.Column, args.Sender, args.NotifyType
4464 // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
4465 try
4466 {
4467 if ((args.Row > -1))
4468 {
4469
4470
4471 string company = view.dataView[args.Row]["Company"].ToString();
4472 string custID =view.dataView[args.Row]["CustomerCustID"].ToString();
4473 if(company =="200" && custID=="250"){
4474 txtCustomerPONum.ReadOnly =false;
4475 txtCustomerPONum.Visible = true;
4476 lblCustomerPONum.Visible = true;
4477 epiTextBoxSalesRepCode1.Value = view.dataView[args.Row]["PEU_SalesRepCode1_c"].ToString();
4478 }
4479 else{
4480 txtCustomerPONum.ReadOnly =false;
4481 txtCustomerPONum.Visible = false;
4482 lblCustomerPONum.Visible = false;
4483 epiTextBoxSalesRepCode1.Value = view.dataView[args.Row]["SalesRepCode1"].ToString();
4484 }
4485
4486 if ( m_custID != Convert.ToString(view.dataView[args.Row]["CustomerCustID"]) )
4487 {
4488 m_custID = Convert.ToString(view.dataView[args.Row]["CustomerCustID"]) ;
4489
4490 if ( Convert.ToBoolean(view.dataView[args.Row]["OpenOrder"]) )
4491 {
4492
4493 edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CommentsFromCustomer_c"] = "Start";
4494 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
4495 parameters.Add("pcustid", m_custID);
4496 DataTable dt = GetQueryData("CPECustomerComments", parameters);
4497 if ( dt.Rows.Count > 0 )
4498 {
4499 edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CommentsFromCustomer_c"] = dt.Rows[0]["Calculated_Comments"];
4500 }
4501 }
4502 }
4503 if ( m_custNum != Convert.ToInt32(view.dataView[args.Row]["CustNum"]) || m_shipToNum != Convert.ToString(view.dataView[args.Row]["ShipToNum"]) )
4504 {
4505 m_custNum = Convert.ToInt32(view.dataView[args.Row]["CustNum"]);
4506 m_shipToNum = Convert.ToString(view.dataView[args.Row]["ShipToNum"]);
4507 SetHeaderPriceListDropDown(m_custNum, m_shipToNum);
4508 }
4509 }
4510 else
4511 {
4512 m_custID = "";
4513 m_custNum = 0;
4514 m_shipToNum = "";
4515 }
4516 }
4517 catch ( Exception ex )
4518 {
4519 MessageBox.Show("edvOrderHed_EpiViewNotification error: " + ex.Message);
4520 }
4521 }
4522
4523 private void oTrans_ordAdapter_AfterAdapterMethod(object sender, AfterAdapterMethodArgs args)
4524 {
4525 // ** Argument Properties and Uses **
4526 // ** args.MethodName **
4527 // ** Add Event Handler Code **
4528
4529 // ** Use MessageBox to find adapter method name
4530 // MessageBox.Show(args.MethodName);
4531 switch (args.MethodName)
4532 {
4533 case "ChangeSoldToID":
4534
4535 edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CommentsFromCustomer_c"] = "Start";
4536 System.Collections.Hashtable parameters = new System.Collections.Hashtable();
4537 parameters.Add("pcustnum", edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustNum"].ToString());
4538 DataTable dt = GetQueryData("CPECustomerComments", parameters);
4539 if ( dt.Rows.Count > 0 )
4540 {
4541 edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CommentsFromCustomer_c"] = dt.Rows[0]["Calculated_Comments"];
4542 }
4543 break;
4544 }
4545
4546 }
4547
4548 private void btnRefreshContact_Click(object sender, System.EventArgs args)
4549 {
4550 LoadDOBDropDown();
4551
4552 string select = " select PerConID as PerConID, FirstName, LastName, DOB_c as DOB, EmployeeNum_c as EmployeeNum, CorpName as Company, Comment," +
4553 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4554 " '1' " +
4555 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
4556 " '3' " +
4557 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
4558 " '5' " +
4559 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
4560 " '7' " +
4561 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
4562 " '9' " +
4563 " else " +
4564 " '' " +
4565 " end as RightMould, " +
4566 " case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4567 " '2' " +
4568 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
4569 " '4' " +
4570 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
4571 " '6' " +
4572 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
4573 " '8' " +
4574 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
4575 " '10' " +
4576 " else " +
4577 " '' " +
4578 " end as LeftMould, " +
4579" case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4580 " plo.lotnum + '1-2' " +
4581 " when plo.percon_3_4_c = dbo.percon.PerConID then " +
4582 " plo.lotnum + '3-4' " +
4583 " when plo.percon_5_6_c = dbo.percon.PerConID then " +
4584 " plo.lotnum + '5-6' " +
4585 " when plo.percon_7_8_c = dbo.percon.PerConID then " +
4586 " plo.lotnum + '7-8' " +
4587 " when plo.percon_9_10_c = dbo.percon.PerConID then " +
4588 " plo.lotnum + '9-10' " +
4589 " else " +
4590 " '' " +
4591 " end as SerialNo" +
4592 " , case when plo.percon_1_2_c = dbo.percon.PerConID then " +
4593" plo.PerCon_1_2_Notes_c " +
4594" when plo.percon_3_4_c = dbo.percon.PerConID then " +
4595" plo.PerCon_3_4_Notes_c " +
4596" when plo.percon_5_6_c = dbo.percon.PerConID then " +
4597" plo.PerCon_5_6_Notes_c " +
4598" when plo.percon_7_8_c = dbo.percon.PerConID then " +
4599" plo.PerCon_7_8_Notes_c " +
4600" when plo.percon_9_10_c = dbo.percon.PerConID then " +
4601" plo.PerCon_9_10_Notes_c " +
4602" else " +
4603" '' " +
4604" end " +
4605 " as Notes, " +
4606
4607 " plo.ExpirationDate as ExpirationDate, " +
4608 " plo.lotnum as ExistingCast " +
4609" from dbo.percon with (nolock) " +
4610" left outer join dbo.partlot as plo on plo.company = dbo.percon.company and plo.ExpirationDate > GetDate() and ( plo.percon_1_2_c = PerConID or plo.percon_3_4_c = PerConID or plo.percon_5_6_c = PerConID or plo.percon_7_8_c = PerConID or plo.percon_9_10_c = PerConID) " +
4611 " where dbo.percon.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and dbo.percon.PerConId = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " order by dbo.percon.perconid, ExistingCast ";
4612
4613 if ( ((Ice.Core.Session)oTrans.Session).CompanyID != "200" )
4614 {
4615
4616 select = " select pc.PerConID as PerConID, pc.FirstName, pc.LastName, pc.DOB_c as DOB, pc.EmployeeNum_c as EmployeeNum, pc.CorpName as Company, " +
4617
4618" case when pl.percon_1_2_c = gpc.PerConID then " +
4619" '1' " +
4620" when pl.percon_3_4_c = gpc.PerConID then " +
4621" '3' " +
4622" when pl.percon_5_6_c = gpc.PerConID then " +
4623" '5' " +
4624" when pl.percon_7_8_c = gpc.PerConID then " +
4625" '7' " +
4626" when pl.percon_9_10_c = gpc.PerConID then " +
4627" '9' " +
4628" else " +
4629" '' " +
4630" end as RightMould, " +
4631" case when pl.percon_1_2_c = gpc.PerConID then " +
4632" '2' " +
4633" when pl.percon_3_4_c = gpc.PerConID then " +
4634" '4' " +
4635" when pl.percon_5_6_c = gpc.PerConID then " +
4636" '6' " +
4637" when pl.percon_7_8_c = gpc.PerConID then " +
4638" '8' " +
4639" when pl.percon_9_10_c = gpc.PerConID then " +
4640" '10' " +
4641" else " +
4642" '' " +
4643" end as LeftMould, " +
4644
4645" case when pl.percon_1_2_c = gpc.PerConID then " +
4646" pl.lotnum + '1-2' " +
4647" when pl.percon_3_4_c = gpc.PerConID then " +
4648" pl.lotnum + '3-4' " +
4649" when pl.percon_5_6_c = gpc.PerConID then " +
4650" pl.lotnum + '5-6' " +
4651" when pl.percon_7_8_c = gpc.PerConID then " +
4652" pl.lotnum + '7-8' " +
4653" when pl.percon_9_10_c = gpc.PerConID then " +
4654" pl.lotnum + '9-10' " +
4655" else " +
4656" '' " +
4657" end as SerialNo, " +
4658" case when pl.percon_1_2_c = gpc.PerConID then " +
4659" pl.PerCon_1_2_Notes_c " +
4660" when pl.percon_3_4_c = gpc.PerConID then " +
4661" pl.PerCon_3_4_Notes_c " +
4662" when pl.percon_5_6_c = gpc.PerConID then " +
4663" pl.PerCon_5_6_Notes_c " +
4664" when pl.percon_7_8_c = gpc.PerConID then " +
4665" pl.PerCon_7_8_Notes_c " +
4666" when pl.percon_9_10_c = gpc.PerConID then " +
4667" pl.PerCon_9_10_Notes_c " +
4668" else " +
4669" '' " +
4670" end as Notes , " +
4671 " pl.ExpirationDate as ExpirationDate, " +
4672 " pl.lotnum as ExistingCast " +
4673" from dbo.percon as pc with (nolock) " +
4674" join erp.glbpercon as gpc on '200' = gpc.company and gpc.GlbCompany = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and gpc.glbperconid = pc.perconid " +
4675" left outer join dbo.PartLot as pl with (nolock)on pl.company = gpc.company and pl.expirationdate > Getdate() and ( (pl.percon_1_2_c = gpc.PerConID and gpc.perconid > 0 ) or " +
4676" (pl.percon_3_4_c = gpc.PerConID and gpc.perconid > 0 ) or (pl.percon_5_6_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_7_8_c = gpc.PerConID and gpc.perconid > 0 ) or ( pl.percon_9_10_c = gpc.PerConID and gpc.perconid > 0 ) ) " +
4677" where pc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and pc.PerConId = " + edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["PerCon_c"].ToString() + " order by pc.perconid, pl.lotnum";
4678 }
4679
4680 // MessageBox.Show("2511");
4681 // txtQuery.Text += "2511***********************************************2511\n\n" + select;
4682 LaunchSearch(select, true);
4683 }
4684
4685
4686/*
4687private void OrderDtl_AfterRowChange(EpiRowChangedArgs args)
4688 {
4689
4690// suspect this code will never be called so commenting it out and leaving a message for the user
4691
4692
4693 // ** Argument Properties and Uses **
4694 // args.CurrentView.dataView[args.CurrentRow]["FieldName"]
4695 // args.LastRow, args.CurrentRow, args.CurrentView
4696 // Add Event Handler Code
4697 //MessageBox.Show("OrderDtl_AfterRowChange");
4698 //MessageBox.Show(args.ToString());
4699 //MessageBox.Show(args.CurrentView.dataView[args.CurrentRow]["PartNum"].ToString());
4700 string filter_GrYeWh = "10001N 10001R 10002N 10002R 10003N 10003R 10004N 10004R 10005N 10005R 10006N 10006R 10007N 10007R 10008N 10008R 10009N 10009R 10010N 10010R " +
4701 "10011N 10011R 10012N 10012R 10013N 10013R 10014N 10014R 10015N 10015R 10016N 10016R 10017N 10017R 10018N 10018R 10037N 10037R 10038N 10038R 10039N 10039R 10048N " +
4702 "10048R 10049N 10049R 10050N 10050R 10051N 10051R 10052N 10052R 10053N 10053R 10054N 10054R 10055N 10055R 10056N 10056R 10057N 10057R 10068N 10068R 10069N 10069R " +
4703 "10070N 10070R 10071N 10071R 10073N 10073R 10074N 10074R 10075N 10075R 10076N 10076R 10077N 10077R 10078N 10078R 10079N 10079R 10080N 10080R 10100N 10100R 10101N " +
4704 "10101R 10102N 10102R 12001N 12001R 12009R 12010N 12010R 12012N 12012R 12013N 12013R 12022N 12022R 13005N 13005R 14002N 14002R 14005N 14005R 11005N 11005R 11016N 11016R 10040N " +
4705 "10040R 10041N 10041R 10042N 10042R 10072N 10072R 10094N 10094R 10095N 10095R 10096N 10096R 10097N 10097R 10098N 10098R 10099N 10099R";
4706
4707 string filter_musician = "11001N 11001R 11002N 11002R 11003N 11003R 11004N 11004R 11018N 11018R 11019N 11019R 11020N 11020R 11021N 11021R";
4708
4709 string filter_none = "10019N 10019R 10020N 10020R 10021N 10021R 10022N 10022R 10023N 10023R 10024N 10024R 10025N 10025R 10026N 10026R 10027N 10027R 10028N 10028R " +
4710 "10029N 10029R 10030N 10030R 10031N 10031R 10032N 10032R 10033N 10033R 10034N 10034R 10035N 10035R 10036N 10036R 10058N 10058R 10059N 10059R 10060N 10060R " +
4711 "10061N 10061R 10062N 10062R 10063N 10063R 10064N 10064R 10065N 10065R 10066N 10066R 10067N 10067R 10081N 10081R 10082N 10082R 10083N 10083R 10084N 10084R " +
4712 "10086N 10086R 10087N 10087R 10088N 10088R 10089N 10089R 10090N 10090R 10091N 10091R 10092N 10092R 10093N 10093R 11007N 11007R 11010N 11010R 11011N 11011R " +
4713 "11012N 11012R 11013N 11013R 11014N 11014R 11015N 11015R 12006N 12006R 12007N 12007R 12008N 12008R 12009N 12011N 12011R 12014 12014K 12015 " +
4714 "12015K 12016 12016K 12017 12017K 12018 12018K 12019 12019K 12020 12021 12031N 12031R 12032N 12032R 12041N 12041R 13001N 13001R 13002N 13002R 13003N 13003R " +
4715 "13004N 13004R 13006N 13006R 13007N 13007R 13008N 13008R 13009N 13009R 13010N 13010R 13011N 13011R 13012N 13012R 13013N 13013R 13014N 13014R 13015N 13015R " +
4716 "13016N 13016R 13017N 13017R 13018N 13018R 13019N 13019R 14001N 14001R 14003N 14003R 14004N 14004R 11006N 11006R 11017N 11017R 10045N 10045R 10046N 10046R " +
4717 "10085N 10085R 12005N 12005R";
4718
4719 string[] filters;
4720
4721 if (filter_GrYeWh.IndexOf(args.CurrentView.dataView[args.CurrentRow]["PartNum"].ToString()) > -1)
4722 {
4723 filters = new string[3] {"Green", "Yellow", "White"};
4724 }
4725 else if (filter_musician.IndexOf(args.CurrentView.dataView[args.CurrentRow]["PartNum"].ToString()) > -1)
4726 {
4727 filters = new string[2] {"ER9", "ER15"};
4728 }
4729 else
4730 {
4731 filters = new string [0] {};
4732 }
4733
4734 //Populate the Filter dropdown
4735 SetGridDropDown(grdDtlList, "Filter_c", filters);
4736
4737 //standard colors are blk, blu, cle, grn, org, pur, red, safT tan, Teal, wht, yel, pink
4738 string colour_standard = "10001N 10001R 10002N 10002R 10003N 10003R 10004N 10004R 10005N 10005R 10006N 10006R 10007N 10007R 10008N 10008R 10009N 10009R 10010N " +
4739 "10010R 10011N 10011R 10012N 10012R 10013N 10013R 10014N 10014R 10015N 10015R 10016N 10016R 10017N 10017R 10018N 10018R 10037N 10037R 10038N 10038R 10039N " +
4740 "10039R 10048N 10048R 10049N 10049R 10050N 10050R 10051N 10051R 10052N 10052R 10053N 10053R 10054N 10054R 10055N 10055R 10056N 10056R 10057N 10057R 10068N " +
4741 "10068R 10069N 10069R 10070N 10070R 10071N 10071R 10073N 10073R 10074N 10074R 10075N 10075R 10076N 10076R 10077N 10077R 10078N 10078R 10079N 10079R 10080N " +
4742 "10080R 10100N 10100R 10101N 10101R 10102N 10102R 12009R 12010N 12010R 12012N 12012R 12013N 12013R 12022N 12022R 13005N 13005R 14002N 14002R 14005N 14005R " +
4743 "11001N 11001R 11002N 11002R 11003N 11003R 11004N 11004R 11018N 11018R 11019N 11019R 11020N 11020R 11021N 11021R 10019N 10019R 10020N 10020R 10021N 10021R " +
4744 "10022N 10022R 10023N 10023R 10024N 10024R 10025N 10025R 10026N 10026R 10027N 10027R 10028N 10028R 10029N 10029R 10030N 10030R 10031N 10031R 10032N 10032R " +
4745 "10033N 10033R 10034N 10034R 10035N 10035R 10036N 10036R 10058N 10058R 10059N 10059R 10060N 10060R 10061N 10061R 10062N 10062R 10063N 10063R 10064N 10064R " +
4746 "10065N 10065R 10066N 10066R 10067N 10067R 10081N 10081R 10082N 10082R 10083N 10083R 10084N 10084R 10086N 10086R 10087N 10087R 10088N 10088R 10089N 10089R " +
4747 "10090N 10090R 10091N 10091R 10092N 10092R 10093N 10093R 11007N 11007R 11010N 11010R 11011N 11011R 11012N 11012R 11013N 11013R 11014N 11014R 11015N 11015R " +
4748 "12001N 12001R 12006N 12006R 12007N 12007R 12008N 12008R 12009N 12011N 12011R 12014 12014K 12015 12015K 12016 12016K 12017 12017K 12018 12018K 12019 12019K " +
4749 "12020 12021 12031N 12031R 12032N 12032R 12041N 12041R 13001N 13001R 13002N 13002R 13003N 13003R 13004N 13004R 13006N 13006R 13007N 13007R 13008N 13008R " +
4750 "13009N 13009R 13010N 13010R 13011N 13011R 13012N 13012R 13013N 13013R 13014N 13014R 13015N 13015R 13016N 13016R 13017N 13017R 13018N 13018R 13019N 13019R " +
4751 "14001N 14001R 14003N 14003R 14004N 14004R";
4752
4753 string colour_standard_plus_GID = "11005N 11005R 11016N 11016R 11006N 11006R 11017N 11017R";
4754
4755 string colour_standard_plus_grey = "10040N 10040R 10041N 10041R 10042N 10042R 10072N 10072R 10094N 10094R 10095N 10095R 10096N 10096R 10097N 10097R 10098N 10098R " +
4756 "10099N 10099R 10045N 10045R 10046N 10046R 10085N 10085R 12005N 12005R";
4757
4758 string[] colors;
4759
4760 if (colour_standard.IndexOf(args.CurrentView.dataView[args.CurrentRow]["PartNum"].ToString()) > -1)
4761 {
4762 colors = new string[13] {"Black", "Blue", "Clear", "Green", "Orange", "Purple", "Red", "SafT", "Tan", "Teal", "White", "Yellow", "Pink" };
4763 }
4764 else if (colour_standard_plus_GID.IndexOf(args.CurrentView.dataView[args.CurrentRow]["PartNum"].ToString()) > -1)
4765 {
4766 colors = new string[14] {"Black", "Blue", "Clear", "Green", "Orange", "Purple", "Red", "SafT", "Tan", "Teal", "White", "Yellow", "Pink", "GID" };
4767 }
4768 else if (colour_standard_plus_grey .IndexOf(args.CurrentView.dataView[args.CurrentRow]["PartNum"].ToString()) > -1)
4769 {
4770 colors = new string[14] {"Black", "Blue", "Clear", "Green", "Orange", "Purple", "Red", "SafT", "Tan", "Teal", "White", "Yellow", "Pink", "Grey" };
4771 }
4772 else
4773 {
4774 colors = new string [0] {};
4775 }
4776
4777 //Populate the Colour dropdown
4778 SetGridDropDown(grdDtlList, "Colour_c", colors);
4779 }
4780 */
4781
4782 private void OrderDtl_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
4783 {
4784 // ** Argument Properties and Uses **
4785 // args.Row["FieldName"]
4786 // args.Column, args.ProposedValue, args.Row
4787 // Add Event Handler Code
4788
4789 try
4790 {
4791 switch (args.Column.ColumnName)
4792 {
4793 case "PerConLastName_c":
4794 case "PerConFirstName_c":
4795 case "PerConDOB_c":
4796 //case "EmployeeNum_c":
4797 // MessageBox.Show("629>" + args.ProposedValue.ToString() + "<>" + args.Row["EmployeeNum_c"].ToString() + "<>" + args.Column.ColumnName);
4798 //case "PerConCorpName_c":
4799 // if ( m_copying == false && args.Row["PerConDOB_c"] != System.DBNull.Value && args.Row["PerConLastName_c"].ToString().Length > 0 && args.Row["PerConFirstName_c"].ToString().Length > 0 )
4800 if ( m_copying == false && args.Row["PerConLastName_c"].ToString().Length > 0 && args.Row["PerConFirstName_c"].ToString().Length > 0 )
4801 {
4802 // MessageBox.Show("634>");
4803 if ( args.Row["PerConDOB_c"] != System.DBNull.Value )
4804 {
4805 // MessageBox.Show("637>");
4806 if ( CheckContactExists(args.Row["PerConFirstName_c"].ToString(),args.Row["PerConLastName_c"].ToString(),Convert.ToDateTime(args.Row["PerConDOB_c"]), Convert.ToInt32(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustNum"])) == false )
4807 {
4808 // MessageBox.Show("640>");
4809 CreateNewContact(args.Row["PerConFirstName_c"].ToString(),args.Row["PerConLastName_c"].ToString(),args.Row["PerConDOB_c"],args.Row["EmployeeNum_c"].ToString(),Convert.ToString(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustomerName"]), Convert.ToInt32(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustNum"]));
4810 }
4811 else
4812 {
4813 //MessageBox.Show("645>");
4814 UpdateContact(Convert.ToInt32(args.Row["PerCon_c"]), args.Row["EmployeeNum_c"].ToString(), Convert.ToString(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustomerName"]), Convert.ToInt32(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["CustNum"]));
4815 }
4816 }
4817 }
4818 break;
4819 case "SalesUM":
4820 //Reorders are automatically populated as pairs, this should catch if it is then changed to Left or Right
4821
4822 if (args.Row["PartNum"].ToString().ToUpper().EndsWith("R"))
4823 {
4824 string salesUM = edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["SalesUM"].ToString().Trim().ToLower();
4825
4826 if ( salesUM == "pr" || salesUM == "right" || salesUM == "ea" )
4827 {
4828 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldRight_c"] = edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_MouldRight_c"];
4829 }
4830 else
4831 {
4832 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldRight_c"] = "";
4833 }
4834 if ( salesUM == "pr" || salesUM == "left" || salesUM == "ea" )
4835 {
4836 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldLeft_c"] = edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_MouldLeft_c"];
4837 }
4838 else
4839 {
4840 edvOrderDtl.dataView.Table.Rows[edvOrderDtl.Row]["CPE_DspMouldLeft_c"] = "";
4841 }
4842 }
4843 break;
4844 case "PerCon_c":
4845 case "PartNum":
4846
4847 // set revision to latest approved for the Site selected
4848 string latestRev;
4849 if ( GetLatestRev(args.Row["PartNum"].ToString(), edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["OrderSite_c"].ToString(), out latestRev))
4850 {
4851 args.Row["RevisionNum"] = latestRev;
4852 }
4853 // set price list from header
4854 if ( !string.IsNullOrEmpty(edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["HeaderPriceList_c"].ToString()) )
4855 {
4856 args.Row["OverridePriceList"] = true;
4857 args.Row["BreakListCode"] = edvOrderHed.dataView.Table.Rows[edvOrderHed.Row]["HeaderPriceList_c"];
4858 }
4859 // load the available colours and filters for this part //greg
4860 //MessageBox.Show(args.Row["PartNum"].ToString() + "-c");
4861
4862 string filter_GrYeWh = "10001N 10001R 10002N 10002R 10003N 10003R 10004N 10004R 10005N 10005R 10006N 10006R 10007N 10007R 10008N 10008R 10009N 10009R 10010N 10010R " +
4863 "10011N 10011R 10012N 10012R 10013N 10013R 10014N 10014R 10015N 10015R 10016N 10016R 10017N 10017R 10018N 10018R 10037N 10037R 10038N 10038R 10039N 10039R 10048N " +
4864 "10048R 10049N 10049R 10050N 10050R 10051N 10051R 10052N 10052R 10053N 10053R 10054N 10054R 10055N 10055R 10056N 10056R 10057N 10057R 10068N 10068R 10069N 10069R " +
4865 "10070N 10070R 10071N 10071R 10073N 10073R 10074N 10074R 10075N 10075R 10076N 10076R 10077N 10077R 10078N 10078R 10079N 10079R 10080N 10080R 10100N 10100R 10101N " +
4866 "10101R 10102N 10102R 10103N 10103R 12001N 12001R 12009R 12010N 12010R 12012N 12012R 12013N 12013R 12022N 12022R 13005N 13005R 14002N 14002R 14005N 14005R 11005N 11005R 11016N 11016R 10040N " +
4867 "10040R 10041N 10041R 10042N 10042R 10072N 10072R 10094N 10094R 10095N 10095R 10096N 10096R 10097N 10097R 10098N 10098R 10099N 10099R";
4868
4869 string filter_musician = "11001N 11001R 11002N 11002R 11003N 11003R 11004N 11004R 11018N 11018R 11019N 11019R 11020N 11020R 11021N 11021R";
4870
4871 string filter_none = "10019N 10019R 10020N 10020R 10021N 10021R 10022N 10022R 10023N 10023R 10024N 10024R 10025N 10025R 10026N 10026R 10027N 10027R 10028N 10028R " +
4872 "10029N 10029R 10030N 10030R 10031N 10031R 10032N 10032R 10033N 10033R 10034N 10034R 10035N 10035R 10036N 10036R 10058N 10058R 10059N 10059R 10060N 10060R " +
4873 "10061N 10061R 10062N 10062R 10063N 10063R 10064N 10064R 10065N 10065R 10066N 10066R 10067N 10067R 10081N 10081R 10082N 10082R 10083N 10083R 10084N 10084R " +
4874 "10086N 10086R 10087N 10087R 10088N 10088R 10089N 10089R 10090N 10090R 10091N 10091R 10092N 10092R 10093N 10093R 11007N 11007R 11010N 11010R 11011N 11011R " +
4875 "11012N 11012R 11013N 11013R 11014N 11014R 11015N 11015R 12006N 12006R 12007N 12007R 12008N 12008R 12009N 12011N 12011R 12014 12014K 12015 " +
4876 "12015K 12016 12016K 12017 12017K 12018 12018K 12019 12019K 12020 12021 12031N 12031R 12032N 12032R 12041N 12041R 13001N 13001R 13002N 13002R 13003N 13003R " +
4877 "13004N 13004R 13006N 13006R 13007N 13007R 13008N 13008R 13009N 13009R 13010N 13010R 13011N 13011R 13012N 13012R 13013N 13013R 13014N 13014R 13015N 13015R " +
4878 "13016N 13016R 13017N 13017R 13018N 13018R 13019N 13019R 14001N 14001R 14003N 14003R 14004N 14004R 11006N 11006R 11017N 11017R 10045N 10045R 10046N 10046R " +
4879 "10085N 10085R 12005N 12005R";
4880
4881 string[] filters;
4882
4883 //MessageBox.Show(args.Row["Filter_c"].ToString());
4884
4885 if (filter_GrYeWh.IndexOf(args.Row["PartNum"].ToString()) > -1)
4886 {
4887 //Set the available filter colours
4888 filters = new string[3] {"Green", "Yellow", "White"};
4889
4890 //Test that the current filter colour is one of the available colours. If not, notify the user and clear it.
4891 if (args.Row["Filter_c"].ToString() != "")
4892 {
4893 bool filterfound = false;
4894 foreach (string fil in filters)
4895 {
4896 if (fil == args.Row["Filter_c"].ToString())
4897 {
4898 filterfound = true;
4899 break;
4900 }
4901 }
4902
4903 if (filterfound)
4904 {
4905 //MessageBox.Show(args.Row["Filter_c"].ToString() + " is in the newly populated filter dropdown.");
4906 }
4907 else
4908 {
4909 MessageBox.Show("The previous filter colour is not allowed for new Part number. Please select a new one.");
4910 args.Row["Filter_c"] = "";
4911 }
4912 }
4913 }
4914 else if (filter_musician.IndexOf(args.Row["PartNum"].ToString()) > -1)
4915 {
4916 //Set the available filter colours
4917 filters = new string[2] {"ER9", "ER15"};
4918 //Test that the current filter colour is one of the available colours. If not, notify the user and clear it.
4919 if (args.Row["Filter_c"].ToString() != "")
4920 {
4921 bool filterfound = false;
4922 foreach (string fil in filters)
4923 {
4924 if (fil == args.Row["Filter_c"].ToString())
4925 {
4926 filterfound = true;
4927 break;
4928 }
4929 }
4930
4931 if (filterfound)
4932 {
4933 //MessageBox.Show(args.Row["Filter_c"].ToString() + " is in the newly populated filter dropdown.");
4934 }
4935 else
4936 {
4937 MessageBox.Show("The previous filter colour is not allowed for new Part number. Please select a new one.");
4938 args.Row["Filter_c"] = "";
4939 }
4940 }
4941 }
4942 else
4943 {
4944 filters = new string [0] {};
4945 args.Row["Filter_c"] = "";
4946 }
4947
4948 //Populate the Filter dropdown
4949 SetGridDropDown(grdDtlList, "Filter_c", filters);
4950
4951 //standard colors are blk, blu, cle, grn, org, pur, red, safT tan, Teal, wht, yel, pink
4952 string colour_standard = "10001N 10001R 10002N 10002R 10003N 10003R 10004N 10004R 10005N 10005R 10006N 10006R 10007N 10007R 10008N 10008R 10009N 10009R 10010N " +
4953 "10010R 10011N 10011R 10012N 10012R 10013N 10013R 10014N 10014R 10015N 10015R 10016N 10016R 10017N 10017R 10018N 10018R 10037N 10037R 10038N 10038R 10039N " +
4954 "10039R 10048N 10048R 10049N 10049R 10050N 10050R 10051N 10051R 10052N 10052R 10053N 10053R 10054N 10054R 10055N 10055R 10056N 10056R 10057N 10057R 10068N " +
4955 "10068R 10069N 10069R 10070N 10070R 10071N 10071R 10073N 10073R 10074N 10074R 10075N 10075R 10076N 10076R 10077N 10077R 10078N 10078R 10079N 10079R 10080N " +
4956 "10080R 10100N 10100R 10101N 10101R 10102N 10102R 12009R 12010N 12010R 12012N 12012R 12013N 12013R 12022N 12022R 13005N 13005R 14002N 14002R 14005N 14005R " +
4957 "11001N 11001R 11002N 11002R 11003N 11003R 11004N 11004R 11018N 11018R 11019N 11019R 11020N 11020R 11021N 11021R 10019N 10019R 10020N 10020R 10021N 10021R " +
4958 "10022N 10022R 10023N 10023R 10024N 10024R 10025N 10025R 10026N 10026R 10027N 10027R 10028N 10028R 10029N 10029R 10030N 10030R 10031N 10031R 10032N 10032R " +
4959 "10033N 10033R 10034N 10034R 10035N 10035R 10036N 10036R 10058N 10058R 10059N 10059R 10060N 10060R 10061N 10061R 10062N 10062R 10063N 10063R 10064N 10064R " +
4960 "10065N 10065R 10066N 10066R 10067N 10067R 10081N 10081R 10082N 10082R 10083N 10083R 10084N 10084R 10086N 10086R 10087N 10087R 10088N 10088R 10089N 10089R " +
4961 "10090N 10090R 10091N 10091R 10092N 10092R 10093N 10093R 10103N 10103R 11007N 11007R 11010N 11010R 11011N 11011R 11012N 11012R 11013N 11013R 11014N 11014R 11015N 11015R " +
4962 "12001N 12001R 2006N 12006R 12007N 12007R 12008N 12008R 12009N 12011N 12011R 12014 12014K 12015 12015K 12016 12016K 12017 12017K 12018 12018K 12019 12019K " +
4963 "12020 12021 12031N 12031R 12032N 12032R 12041N 12041R 13001N 13001R 13002N 13002R 13003N 13003R 13004N 13004R 13006N 13006R 13007N 13007R 13008N 13008R " +
4964 "13009N 13009R 13010N 13010R 13011N 13011R 13012N 13012R 13013N 13013R 13014N 13014R 13015N 13015R 13016N 13016R 13017N 13017R 13018N 13018R 13019N 13019R " +
4965 "14001N 14001R 14003N 14003R 14004N 14004R";
4966
4967 string colour_standard_plus_GID = "11005N 11005R 11016N 11016R 11006N 11006R 11017N 11017R";
4968
4969 string colour_standard_plus_grey = "10040N 10040R 10041N 10041R 10042N 10042R 10072N 10072R 10094N 10094R 10095N 10095R 10096N 10096R 10097N 10097R 10098N 10098R " +
4970 "10099N 10099R 10045N 10045R 10046N 10046R 10085N 10085R 12005N 12005R";
4971
4972 string colour_PartNum_NOT_Pink_Diamond_and_White_Diamond = "11016N 11016R 11017N 11017R 11005N 11005R 11006N 11006R 10100N 10100R 10101N 10101R 10102N 10102R 10103N 10103R 11001N 11001R 11004N 11004R";
4973
4974 List<string> colorList = new List<string> {"Black", "Blue", "Clear", "Green", "Orange", "Purple", "Red", "SafT", "Tan", "Teal", "White", "Yellow", "Pink"};
4975 string currentColor = "";
4976
4977 //if there's a current color selected, capture it for comparison later
4978 if (colour_standard.IndexOf(args.Row["PartNum"].ToString()) > -1)
4979 {}
4980 else if (colour_standard_plus_GID.IndexOf(args.Row["PartNum"].ToString()) > -1)
4981 {
4982 colorList.Add("GID");
4983 }
4984 else if (colour_standard_plus_grey.IndexOf(args.Row["PartNum"].ToString()) > -1)
4985 {
4986 colorList.Add("Grey");
4987 }
4988
4989 //Check to see if the part num is one that does NOT have Pink Glitter or White Diamond as an option and add them accordingly
4990 if (colour_PartNum_NOT_Pink_Diamond_and_White_Diamond.IndexOf(args.Row["PartNum"].ToString()) == -1)
4991 {
4992 colorList.Add("White Diamond");
4993 colorList.Add("Pink Glitter");
4994 }
4995
4996 //Test that the current colour is one of the available colours. If not, notify the user and clear it.
4997 if (currentColor != "")
4998 {
4999 bool colourfound = false;
5000 foreach (string col in colorList)
5001 {
5002 if (col == args.Row["Colour_c"].ToString())
5003 {
5004 colourfound = true;
5005 break;
5006 }
5007 }
5008
5009 if (!colourfound)
5010 {
5011 MessageBox.Show("The previous colour is not allowed for new Part number. Please select a new one.");
5012 args.Row["Colour_c"] = "";
5013 }
5014 }
5015
5016 //Populate the Colour dropdown
5017 SetGridDropDown(grdDtlList, "Colour_c", colorList);
5018
5019 // if part ends with an N and ther PerCon_c already has a line for a part change the last character to an R
5020 if ( Convert.ToInt32(args.Row["PerCon_c"]) > 0 && args.Row["PartNum"].ToString().ToUpper().EndsWith("N"))
5021 {
5022 DataRow[] rowsInThisOrder = edvOrderDtl.dataView.Table.Select("PerCon_c = " + args.Row["PerCon_c"].ToString().Trim() + " and OrderNum = " + args.Row["OrderNum"].ToString().Trim() + " and OrderLine <> " + args.Row["OrderLine"].ToString().Trim());
5023 // see if there is only one N part num
5024 bool bHasNewPartRow = false;
5025 string nLine = " ";
5026 foreach ( DataRow nRow in rowsInThisOrder )
5027 {
5028 if ( nRow["PartNum"].ToString().ToUpper().EndsWith("N") )
5029 {
5030 bHasNewPartRow = true;
5031 nLine += nRow["OrderLine"].ToString() + " ";
5032 }
5033 }
5034 if ( bHasNewPartRow )
5035 {
5036 MessageBox.Show(args.Row["PerConFirstName_c"].ToString() + " " + args.Row["PerConLastName_c"].ToString() + " has a new part in line " + nLine);// + "\nSwitching part number to R.");
5037 //args.Row["PartNum"] = args.Row["PartNum"].ToString().Remove(args.Row["PartNum"].ToString().Length - 1, 1) + "R";
5038 }
5039 }
5040 else if ( Convert.ToInt32(args.Row["PerCon_c"]) > 0 && args.Row["PartNum"].ToString().ToUpper().EndsWith("R"))
5041 {
5042 int newValue = ChangeContact(false, Convert.ToInt32(args.Row["PerCon_c"]));
5043 if ( newValue != Convert.ToInt32(args.Row["PerCon_c"]) )
5044 {
5045 args.Row["PerCon_c"] = newValue;
5046 }
5047 //string select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date' from erp.partlot where company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and lotnum in (select distinct(pl.lotnum) from erp.partlot as pl with (nolock) join dbo.PlantConfCtrl as pcc with (nolock) on pl.company = pcc.company and pl.partnum = pcc.CastPartNum_c and pcc.plant = '" + ((Ice.Core.Session)oTrans.Session).PlantID + "' and pcc.company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' join dbo.orderdtl as od with (nolock) on od.company = pl.company and pl.lotnum = od.CPE_Cast_c join dbo.PerCon as pc with (nolock) on pc.company = od.company and pc.PerConID = od.PerCon_c where pc.PerConID = " + args.Row["PerCon_c"].ToString() + " and pl.expirationdate > GETDATE())";
5048 string select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', case when PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_1_2_Notes_c when PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_3_4_Notes_c when PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_5_6_Notes_c when PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_7_8_Notes_c when PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_9_10_Notes_c else '' end as Notes from dbo.partlot where company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and expirationdate > GETDATE() and ( PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " or PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " or PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() +" or PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() +" or PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + ")";
5049
5050 select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', case when PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_1_2_Notes_c when PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_3_4_Notes_c when PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_5_6_Notes_c when PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_7_8_Notes_c when PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + " then PerCon_9_10_Notes_c else '' end as Notes , " +
5051 " case when PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " then '1' " + " when PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " then '3' " + " when PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() + " then '5' " + " when PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() + " then '7' " + " when PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + " then '9' else '' end as RightMould, " +
5052 " case when PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " then '2' when PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " then '4' when PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() + " then '6' when PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() + " then '8' when PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + " then '10' else '' end as LeftMould, " +
5053 " case when PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " then lotnum + '1-2' " +
5054 " when PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " then lotnum + '3-4' " +
5055 " when PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() + " then lotnum + '5-6' " +
5056 " when PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() + " then lotnum + '7-8' " +
5057 "when PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + " then lotnum + '9-10' else '' end as SerialNo " +
5058 " from dbo.partlot where company = '" + ((Ice.Core.Session)oTrans.Session).CompanyID + "' and expirationdate > GETDATE() and ( PerCon_1_2_c = " + args.Row["PerCon_c"].ToString() + " or PerCon_3_4_c = " + args.Row["PerCon_c"].ToString() + " or PerCon_5_6_c = " + args.Row["PerCon_c"].ToString() +" or PerCon_7_8_c = " + args.Row["PerCon_c"].ToString() +" or PerCon_9_10_c = " + args.Row["PerCon_c"].ToString() + ")";
5059
5060
5061
5062 if ( ((Ice.Core.Session)oTrans.Session).CompanyID == "250" )
5063 {
5064 select = "select lotnum as 'Cast_Number', ExpirationDate as 'Expiration-Date', " +
5065 " case when PerCon_1_2_c = glb.perconid then '1' when PerCon_3_4_c = glb.perconid then '3' when PerCon_5_6_c = glb.perconid then '5' when PerCon_7_8_c = glb.perconid then '7' when PerCon_9_10_c = glb.perconid then '9' else '' end as RightMould, " +
5066 " case when PerCon_1_2_c = glb.perconid then '2' when PerCon_3_4_c = glb.perconid then '4' when PerCon_5_6_c = glb.perconid then '6' when PerCon_7_8_c = glb.perconid then '8' when PerCon_9_10_c = glb.perconid then '10' else '' end as LeftMould, " +
5067 " case when PerCon_1_2_c = glb.perconid then lotnum + '1-2' when PerCon_3_4_c = glb.perconid then lotnum + '3-4' when PerCon_5_6_c = glb.perconid then lotnum + '5-6' when PerCon_7_8_c = glb.perconid then lotnum + '7-8' when PerCon_9_10_c = glb.perconid then lotnum + '9-10' else '' end as SerialNo, case when PerCon_1_2_c = glb.perconid then PerCon_1_2_Notes_c when PerCon_3_4_c = glb.perconid then PerCon_3_4_Notes_c when PerCon_5_6_c = glb.perconid then PerCon_5_6_Notes_c when PerCon_7_8_c = glb.perconid then PerCon_7_8_Notes_c when PerCon_9_10_c = glb.perconid then PerCon_9_10_Notes_c else '' end as Notes from dbo.partlot as pl with (nolock) join erp.glbpercon as glb with (nolock) on pl.company = glb.company and glb.glbperconid = " + args.Row["PerCon_c"].ToString() + " and ( pl.PerCon_1_2_c = glb.perconid or pl.PerCon_3_4_c = glb.perconid or pl.PerCon_5_6_c = glb.perconid or pl.PerCon_7_8_c = glb.perconid or pl.PerCon_9_10_c = glb.perconid ) where pl.company = '200' and expirationdate > GETDATE() ";
5068
5069 }
5070 // MessageBox.Show("869");
5071 // txtQuery.Text = select;
5072 LaunchCastSearch(select, false);
5073
5074 }
5075 else
5076 {
5077 args.Row["CPE_Cast_c"] = "";
5078 }
5079 args.Row["PerConDropDown_c"] = args.Row["PerCon_c"];
5080 break;
5081 }
5082 }catch ( Exception ex )
5083 {
5084 MessageBox.Show("After field change: " + ex.Message);
5085 }
5086 }
5087
5088}