schangxiang@126.com
2025-09-02 4813bf5781140ecd5c2c7a75d36bf0a2d45a50f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
 
using OfficeOpenXml;
using sunui.forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WMS.EnumDefine;
using WMS.Model;
using WMS.Untils;
using WMS.yunneiWCS;
 
namespace WMS.UI.SynthesizeQuery
{
    public partial class FrmInOutRecord : Form
    {
        WMS.yunneiWCS.Wms_outInStockRecord param = new yunneiWCS.Wms_outInStockRecord();
        int _materilaSalverFlag = 0; //物料空托查询(1、只查物料 2、只查空托盘) 【EditBy shaocx,2024-10-11】
        string _taskTypeName = "";
        string _outInFlagName = "";
        string MaterialName = "";
        string MaterialCode = "";
        int pagasize = 20;
 
        List<Wms_outInStockRecord> exprotData = new List<Wms_outInStockRecord>();
        public FrmInOutRecord()
        {
            InitializeComponent();
            this.dataGridView1.AutoGenerateColumns = false;
            //this.toolStripComboBox1.SelectedIndex = 1;
 
            this.dataGridView1.Columns["createTime"].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss";
            FormHelper.DataGridViewSelfAdaptionWidth(this.dataGridView1);
 
            initData();
        }
 
        private void initData()
        {
            //默认查询一周的
            uiDatetimePicker_start.Value = DateTime.Now.AddDays(-30);
            uiDatetimePicker_end.Value = DateTime.Now.AddDays(1);
 
            this.uiCheckBox_onlyMater.Checked = false;
            this.uiCheckBox_OnlySalver.Checked = false;
 
            //uiDatetimePicker_start.Text = "起始日期";
            //uiDatetimePicker_end.Text = "截止日期";
        }
 
        /// <summary>
        /// 加载下拉数据
        /// </summary>
        private void LoadSelectData()
        {
            var fr = FLogin.wcsWcf.GetSelectList("version");
            var versionList = fr.resData;
            this.uiComboBox_version.Items.Clear();
            this.uiComboBox_version.Items.AddRange(versionList);
 
            //物料编码
            var fr_materialCode = FLogin.wcsWcf.GetSelectList("materialCode");
            var materialCodeList = fr_materialCode.resData;
            this.uiComboBox_materialCode.Items.Clear();
            this.uiComboBox_materialCode.Items.AddRange(materialCodeList);
 
            //物料名称
            var fr_materialName = FLogin.wcsWcf.GetSelectList("materialName");
            var materialNameList = fr_materialName.resData;
            this.uiComboBox_materialName.Items.Clear();
            this.uiComboBox_materialName.Items.AddRange(materialNameList);
 
            //类型
            var fr_Type = FLogin.wcsWcf.GetEnumSelectList("OutInFlag", true);
            var taskList = fr_Type.resData;
            this.uiComboBox_Type.Items.Clear();
            var _list_Type = taskList.Select(x => x.Text).ToList();
            this.uiComboBox_Type.Items.AddRange(_list_Type.ToArray());
            this.uiComboBox_Type.SelectedIndex = -1;
 
 
            //任务名称
            var fr_taskType = FLogin.wcsWcf.GetEnumSelectList("taskType", true);
            var taskTypeList = fr_taskType.resData;
            this.uiComboBox_TaskName.Items.Clear();
            var _list = taskTypeList.Select(x => x.Text).ToList();
            this.uiComboBox_TaskName.Items.AddRange(_list.ToArray());
            this.uiComboBox_TaskName.SelectedIndex = -1;
 
 
        }
        private void FrmInOutRecord_Load(object sender, EventArgs e)
        {
            //每页10条
            //每页20条
            //每页30条
            //每页100条
            try
            {
                LoadSelectData();
 
                //  selectTime = dateTimePicker1.Value;
                //checkBox1.Checked = true;
                //dateTimePicker1.Enabled = false;
                paging paga = new paging();
                paga.pagenum = 1;
                paga.pagesize = pagasize;
                // paga.selectDay = selectTime;
                findData(paga, MaterialName, MaterialCode, "");
            }
            catch (Exception ex)
            {
                WZ.Useful.Commons.LogTextHelper.WriteLine("FrmInOutRecord", "FrmInOutRecord_Load", ex.ToString());
            }
        }
        /// <summary>数据查找
        /// 
        /// </summary>
        /// <param name="page">分页</param>
        /// <param name="name">物料名称</param>
        /// <param name="code">物料编号</param>
        /// <param name="status">任务类型</param>
        private void findData(paging page, string name, string code, string taskTypeName)
        {
            try
            {
                page.materilaSalverFlag = _materilaSalverFlag;
                page.startDateTime = uiDatetimePicker_start.Value;
                page.endDateTime = uiDatetimePicker_end.Value;
                param.outInFlagName = _outInFlagName;
                param.taskTypeName = taskTypeName;
                if (param.taskTypeName == "不筛选")
                {
                    param.taskTypeName = "";
                }
                if (param.outInFlagName == "不筛选")
                {
                    param.outInFlagName = "";
                }
                var res = FLogin.wcsWcf.getOutInStockRecord(page, param);
                if (res.status == 200)
                {
                    exprotData = res.dateAll.ToList();
                    this.dataGridView1.DataSource = res.date.ToList();
                    this.toolStripLabel5.Text = "/" + res.total;
                    this.toolStripLabel6.Text = res.title;
                    if (res.total == 1)
                    {
                        toolStripLabel2.Enabled = false;
                        toolStripTextBox1.Enabled = false;
                        toolStripLabel1.Enabled = false;
                        toolStripLabel4.Enabled = false;
                        toolStripLabel3.Enabled = false;
                    }
                    else
                    {
                        toolStripLabel3.Enabled = true;
                        toolStripLabel2.Enabled = true;
                        toolStripTextBox1.Enabled = true;
                        toolStripLabel4.Enabled = page.pagenum == 1 ? false : true;
                    }
 
                }
                else
                {
                    WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, "数据为空");
                    ms.Show();
                    this.dataGridView1.DataSource = new List<Wms_outInStockRecord>();
                    toolStripLabel2.Enabled = false;
                    toolStripTextBox1.Enabled = false;
                    toolStripLabel1.Enabled = false;
                    toolStripLabel4.Enabled = false;
                    toolStripLabel3.Enabled = false;
                    this.toolStripLabel6.Text = res.title;
                }
            }
            catch (Exception)
            {
                toolStripLabel2.Enabled = false;
                toolStripTextBox1.Enabled = false;
                toolStripLabel1.Enabled = false;
                toolStripLabel4.Enabled = false;
                toolStripLabel3.Enabled = false;
            }
 
        }
        /// <summary>复位
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnReset_Click(object sender, EventArgs e)
        {
 
            initData();
 
            this.uiTextBox_sourcePlace.Text = "";
            this.uiTextBox_toPlace.Text = "";
            this.uiTextBox_supplier.Text = "";
            this.uiComboBox_version.Text = "";
            this.uiTextBox_containerCode.Text = "";
 
            this.uiComboBox_materialCode.Text = MaterialCode = "";
            this.uiComboBox_materialName.Text = MaterialName = "";
            uiComboBox_TaskName.SelectedIndex = -1;
            uiComboBox_TaskName.SelectedItem = "";
 
            uiComboBox_Type.SelectedIndex = -1;
            uiComboBox_Type.SelectedItem = "";
            _outInFlagName = "";
 
            paging paga = new paging();
            paga.pagenum = 1;
            paga.pagesize = pagasize;
            findData(paga, MaterialName, MaterialCode, "");
        }
        /// <summary>查找
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFind_Click(object sender, EventArgs e)
        {
            #region 判断有没有输入筛选条件 uiTextBox_positionName
            param.sourcePlace = uiTextBox_sourcePlace.Text.Trim() != "" ? uiTextBox_sourcePlace.Text.Trim() : "";//起点
            param.toPlace = uiTextBox_toPlace.Text.Trim() != "" ? uiTextBox_toPlace.Text.Trim() : "";//目标点
            param.materialName = uiComboBox_materialName.Text.Trim() != "" ? uiComboBox_materialName.Text.Trim() : "";//物料名称
            param.materialCode = uiComboBox_materialCode.Text.Trim() != "" ? uiComboBox_materialCode.Text.Trim() : "";//物料编码
            param.containerCode = uiTextBox_containerCode.Text.Trim() != "" ? uiTextBox_containerCode.Text.Trim() : "";//托盘号
            param.version = uiComboBox_version.Text.Trim() != "" ? uiComboBox_version.Text.Trim() : "";//机型
            param.supplier = uiTextBox_supplier.Text.Trim() != "" ? uiTextBox_supplier.Text.Trim() : "";//供应商
            //param.positionType = uiCheckBox_surplus.Checked == true ? (byte)PositionType.余料回库 : (byte)0;
 
            #endregion
            MaterialName = this.uiComboBox_materialName.Text.Trim();
            MaterialCode = this.uiComboBox_materialCode.Text.Trim();
            //  taskType = (int)comboBox_type.SelectedIndex;
 
            _taskTypeName = "";
            if (uiComboBox_TaskName.SelectedIndex > -1)
            {
                _taskTypeName = uiComboBox_TaskName.SelectedItem.ToString();
            }
            else
            {
                _taskTypeName = "";
            }
 
            _outInFlagName = "";
            if (uiComboBox_Type.SelectedIndex > -1)
            {
                _outInFlagName = uiComboBox_Type.SelectedItem.ToString();
            }
            else
            {
                _outInFlagName = "";
            }
 
            paging paga = new paging();
            paga.pagenum = 1;
            paga.pagesize = pagasize;
            findData(paga, MaterialName, MaterialCode, _taskTypeName);
            //toolStripTextBox1.Text = "1";
            //toolStripLabel1.Enabled = false;//上一页
            //toolStripLabel4.Enabled = false;//第一页
            //toolStripLabel2.Enabled = true;//下一页
            //toolStripLabel3.Enabled = true;//最后一页
        }
        /// <summary>第一页
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripLabel4_Click(object sender, EventArgs e)
        {
            try
            {
                paging paga = new paging();
                paga.pagenum = 1;
                paga.pagesize = pagasize;
                findData(paga, MaterialName, MaterialCode, _taskTypeName);
                toolStripLabel4.Enabled = false;
                toolStripLabel3.Enabled = true;
                toolStripTextBox1.Text = "1";
                toolStripTextBox1.Enabled = true;
                toolStripLabel1.Enabled = false;
                toolStripLabel2.Enabled = true;
 
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>上一页
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripLabel1_Click(object sender, EventArgs e)
        {
            try
            {
 
                int numPapg = 0;
                int.TryParse(toolStripTextBox1.Text.Trim(), out numPapg);
                numPapg--;
                toolStripTextBox1.Text = numPapg.ToString();
                int sizetatol = 0;
                int a = this.toolStripLabel5.Text.Trim().Length;
                string size = this.toolStripLabel5.Text.Trim().Substring(1, a - 1);
                int.TryParse(size, out sizetatol);
 
                if (numPapg <= sizetatol)
                {
                    paging paga = new paging();
                    paga.pagenum = numPapg;
                    paga.pagesize = pagasize;
                    findData(paga, MaterialName, MaterialCode, _taskTypeName);
                    toolStripLabel2.Enabled = true;
                    toolStripLabel3.Enabled = true;
                    if (numPapg == 1)
                    {
                        toolStripLabel1.Enabled = false;
                    }
                }
                else
                {
                    toolStripTextBox1.Text = "1";
                    WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, "请输入数字,并大于1且不大于总页数");
                    ms.Show();
                }
 
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>第几页回车
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripTextBox1_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    int numPapg = 0;
                    int.TryParse(toolStripTextBox1.Text.Trim(), out numPapg);
                    int sizetatol = 0;
                    int a = this.toolStripLabel5.Text.Trim().Length;
                    string size = this.toolStripLabel5.Text.Trim().Substring(1, a - 1);
                    int.TryParse(size, out sizetatol);
 
                    if (numPapg > 0 && numPapg <= sizetatol)
                    {
 
                        paging paga = new paging();
                        paga.pagenum = numPapg;
                        paga.pagesize = pagasize;
                        findData(paga, MaterialName, MaterialCode, _taskTypeName);
 
                    }
                    else
                    {
                        toolStripTextBox1.Text = "1";
                        WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, "请输入数字,并大于1且不大于总页数");
                        ms.Show();
                    }
                }
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>下一页
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripLabel2_Click(object sender, EventArgs e)
        {
            try
            {
 
                int numPapg = 0;
                int.TryParse(toolStripTextBox1.Text.Trim(), out numPapg);
                numPapg++;
                this.toolStripTextBox1.Text = numPapg.ToString();
                int sizetatol = 0;
                int a = this.toolStripLabel5.Text.Trim().Length;
                string size = this.toolStripLabel5.Text.Trim().Substring(1, a - 1);
                int.TryParse(size, out sizetatol);
                toolStripLabel4.Enabled = true;
                if (numPapg <= sizetatol)
                {
                    paging paga = new paging();
                    paga.pagenum = numPapg;
                    paga.pagesize = pagasize;
                    findData(paga, MaterialName, MaterialCode, _taskTypeName);
                    toolStripLabel1.Enabled = true;
                    if (numPapg == sizetatol)
                    {
                        toolStripLabel2.Enabled = false;
                        toolStripLabel3.Enabled = false;
                    }
                }
                else
                {
                    toolStripTextBox1.Text = "1";
                    WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(2, "请输入数字,并大于1且不大于总页数");
                    ms.Show();
                }
 
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>最后一页
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripLabel3_Click(object sender, EventArgs e)
        {
            try
            {
                int sizetatol = 0;
                int a = this.toolStripLabel5.Text.Trim().Length;
                string size = this.toolStripLabel5.Text.Trim().Substring(1, a - 1);
                int.TryParse(size, out sizetatol);
                paging paga = new paging();
                paga.pagenum = sizetatol;
                paga.pagesize = pagasize;
                findData(paga, MaterialName, MaterialCode, _taskTypeName);
                toolStripLabel3.Enabled = false;
                toolStripLabel4.Enabled = true;
                toolStripTextBox1.Text = sizetatol.ToString();
                toolStripTextBox1.Enabled = true;
                toolStripLabel1.Enabled = true;
                toolStripLabel2.Enabled = false;
 
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>每页数量选择改变
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                pagasize = (toolStripComboBox1.SelectedIndex + 1) * 10;
                paging paga = new paging();
                paga.pagenum = 1;
                paga.pagesize = pagasize;
                findData(paga, MaterialName, MaterialCode, _taskTypeName);
                toolStripTextBox1.Text = "1";
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>类型选择改变
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void comboBox_status_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
        /// <summary>关闭时间搜索
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void checkBox1_Click(object sender, EventArgs e)
        {
 
            //dateTimePicker1.Enabled = !checkBox1.Checked;
 
            //selectTime = checkBox1.Checked == true ? new DateTime() : dateTimePicker1.Value;
            //btnFind_Click(null, null);
        }
        /// <summary>时间搜索赋值
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
        {
            //selectTime = dateTimePicker1.Value;
            //btnFind_Click(null, null);
        }
        //导出数据
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
 
                if (exprotData.Count > 0)
                {
 
                    string path = @"D:\exprotdata\出入库统计" + DateTime.Now.ToString("yyyyMMdd-HHmmss") + ".xlsx";
                    FileInfo copyFile = new FileInfo(path);
                    if (!Directory.Exists(Path.GetDirectoryName(path))) Directory.CreateDirectory(Path.GetDirectoryName(path));
                    using (ExcelPackage package = new ExcelPackage(copyFile))
                    {
                        //获取模板内容
                        #region MyRegion
                        ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("出入库统计");
                        List<Wms_outInStockRecord> GTin = exprotData.Where(x => x.taskType == 1).ToList();//缸体入库
                        List<Wms_outInStockRecord> GTout = exprotData.Where(x => x.taskType == 5).ToList();//缸体出库
                        List<Wms_outInStockRecord> GGin = exprotData.Where(x => x.taskType == 2).ToList();//缸盖入库
                        List<Wms_outInStockRecord> GGout = exprotData.Where(x => x.taskType == 4).ToList();//缸盖出库
                        #region 设置表头
 
                        worksheet.Cells["A1:E1"].Merge = true;
                        worksheet.Cells[1, 1].Value = "总数:" + exprotData.Count + "/缸体入库:" +
                             GTin.Count + "/缸体出库:" + GTout.Count + "/缸盖入库:" + GGin.Count + "/缸盖出库:" + GGout.Count;
 
                        worksheet.Cells[2, 1].Value = "类型";
                        worksheet.Cells[2, 2].Value = "任务类型";
                        worksheet.Cells[2, 3].Value = "任务名称";
                        worksheet.Cells[2, 4].Value = "起点";
                        worksheet.Cells[2, 5].Value = "目标点";
                        worksheet.Cells[2, 6].Value = "机型";
                        worksheet.Cells[2, 7].Value = "物料编号";
                        worksheet.Cells[2, 8].Value = "物料名称";
                        worksheet.Cells[2, 9].Value = "供应商";
                        worksheet.Cells[2, 10].Value = "托盘号";
                        worksheet.Cells[2, 11].Value = "数量";
                        worksheet.Cells[2, 12].Value = "创建时间";
                        worksheet.Cells[2, 13].Value = "创建者";
                        #endregion
                        //List<Wms_outInStockRecord> totalData = new List<Wms_outInStockRecord>();
                        //if (GTin.Count > 0) totalData.AddRange(GTin);
                        //if (GTout.Count > 0) totalData.AddRange(GTout);
                        //if (GGin.Count > 0) totalData.AddRange(GGin);
                        //if (GGout.Count > 0) totalData.AddRange(GGout);
                        if (exprotData.Count > 0)
                        {
 
                            for (int i = 0; i < exprotData.Count; i++)
                            {
                                worksheet.Cells[i + 3, 1].Value = exprotData[i].outInFlagName;
                                worksheet.Cells[i + 3, 2].Value = exprotData[i].taskTypeName;
                                worksheet.Cells[i + 3, 3].Value = exprotData[i].taskName;
                                worksheet.Cells[i + 3, 4].Value = exprotData[i].sourcePlace;
                                worksheet.Cells[i + 3, 5].Value = exprotData[i].toPlace;
                                worksheet.Cells[i + 3, 6].Value = exprotData[i].version;
                                worksheet.Cells[i + 3, 7].Value = exprotData[i].materialCode;
                                worksheet.Cells[i + 3, 8].Value = exprotData[i].materialName;
                                worksheet.Cells[i + 3, 9].Value = exprotData[i].supplier;
                                worksheet.Cells[i + 3, 10].Value = exprotData[i].containerCode;
                                worksheet.Cells[i + 3, 11].Value = exprotData[i].qty;
                                worksheet.Cells[i + 3, 12].Value = exprotData[i].CreateTime == null ? "" : Convert.ToDateTime(exprotData[i].CreateTime).ToString("yyyy-MM-dd HH:mm:ss");
                                worksheet.Cells[i + 3, 13].Value = exprotData[i].Creator;
                            }
                        }
                        #endregion
                        package.Save();//保存
                    }
                    System.Diagnostics.Process.Start("explorer.exe", Path.GetDirectoryName(path));
                }
            }
            catch (Exception)
            {
 
            }
        }
        /// <summary>显示序号
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
        {
            SolidBrush b = new SolidBrush(this.dataGridView1.RowHeadersDefaultCellStyle.ForeColor);
            e.Graphics.DrawString((e.RowIndex + 1).ToString(System.Globalization.CultureInfo.CurrentUICulture), this.dataGridView1.DefaultCellStyle.Font, b, e.RowBounds.Location.X + 20, e.RowBounds.Location.Y + 4);
 
        }
 
        private void uiComboBox_version_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
 
        private void uiComboBox_materialCode_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
 
        private void uiComboBox_materialName_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
 
        private void uiComboBox_TaskName_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
 
        private void uiComboBox_Type_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
 
        private void uiCheckBox_onlyMater_CheckedChanged(object sender, EventArgs e)
        {
            _materilaSalverFlag = uiCheckBox_onlyMater.Checked == true ? 1 : 0;
        }
 
        private void uiCheckBox_OnlySalver_CheckedChanged(object sender, EventArgs e)
        {
            _materilaSalverFlag = uiCheckBox_OnlySalver.Checked == true ? 2 : 0;
        }
    }
}