丸井供应商桌面条码生成程序
yxj
2021-10-15 68b89c5b29442a1e72b968b3e6075b92e1f07724
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using gregn6Lib;
using Pub_Class;
 
namespace SCM
{
    public partial class JIT_ComplementGoodList : Form
    {
        public JIT_ComplementGoodList()
        {
            InitializeComponent();
        }
        //public DBUtility.frmBillQueryCondition_New frmCondition;
        public string ViewName = "h_v_CLD_CallGoodList";
        public string ModCaption = "叫料单列表";
        public string HInnerBillNo = "";
        public const string ModName = "4601";
        public const string ModRightName = "JIT_ComplementGoodList";
        public const string ModRightNameEdit = ModRightName + "_Edit";
        public const string ModRightNameCheck = ModRightName + "_Check";
        public const string ModRightNameClose = ModRightName + "_Close";
        public const string ModRightNameDelete = ModRightName + "_Delete";
        public int HHGQtyCol = 0;
        public int HBHGQtyCol = 0;
        public int HQtyCol = 0;
        public int HPlanQtyCol = 0;
        public int HICMOInterIDCol = 0;
        public int HICMOEntryIDCol = 0;
        public int HICMOBillNoCol = 0;
        public int HSourceInterIDCol = 0;
        public int HSourceEntryIDCol = 0;
        public int HSourceBillNoCol = 0;
        public int HMaterialIDCol = 0;
        public int HMaterialNumberCol = 0;
        public int HMaterialModelCol = 0;
        public int HUnitIDCol = 0;
        public int HDeptIDCol = 0;
        public int HDeptNumberCol = 0;
        public int HJTIDCol = 0;
        public int HWHIDCol = 0;
        public int HSPIDCol = 0;
        public int HProcIDCol = 0;
        public JIT_CallBill oFrm;
        Pub_Class.ClsGridViewSum oSumGrid = new Pub_Class.ClsGridViewSum();
        //public DAL.ClsJIT_CallGoodsBill_CLD BillNew = new DAL.ClsJIT_CallGoodsBill_CLD();   //对应单据类
        //public DAL.ClsJIT_CallGoodsBill_CLD BillOld = new DAL.ClsJIT_CallGoodsBill_CLD();   //对应单据类
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;     //单据状态(新增,修改,浏览,更新单价,变更)
        public Int32 iTopRow = 0;//画横线
        public SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
 
        //
        private void initGrid()
        {
            DBUtility.Xt_BaseBillFun.initGridList(grdMain, this.Name);
            grdMain.CellBorderStyle = DataGridViewCellBorderStyle.Single; //网格线样式:显示网格线
            grdMain.ReadOnly = false;
        }
        //
 
        private void Display()
        {
            this.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
            this.txtHBillNo.Text = ClsPub1.CreateBillCode(ModName, ref ClsPub.sExeReturnInfo, true);//得到新单号
 
            string sDlgWhere = "";
            sDlgWhere = sDlgWhere + ",'" + txtHSeOrderBillNo.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHDeptID.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHMaterID2.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHMaterName2.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHMaterModel2.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + dtpHBDate.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + dtpHEDate.Text.Trim() + "'";
 
            if (sDlgWhere.Trim().Length > 0)
            {
                sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1);
            }
            DataSet DSet;
            //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DSet = oWeb.Get_ICMOBillInfo("exec h_p_CLD_CallGoodList  " + sDlgWhere, "h_p_CLD_CallGoodList", ref DBUtility.ClsPub.sExeReturnInfo);
            if (DSet == null || DSet.Tables[0].Rows.Count == 0)
            {
                grdMain.DataSource = null;
                MessageBox.Show("没有返回任何结果,尝试再次查询!" + DBUtility.ClsPub.sExeReturnInfo);
                return;
            }
            grdMain.DataSource = DSet.Tables[0].DefaultView;
            //设置合计列
            //string sTotalCol = "";
            //string[] sT;
            //sT = sTotalCol.Split(Convert.ToChar(","));
            //oSumGrid.BuildTotalCols(sT);
            //  
            //冻结
            //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
            //string s = frmCondition.cmbHComplete.Text;
            //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol);
            //画线
            SCM.公用类.Xt_BaseBillFun.DisplayGrid(grdMain);
            GraphLine();
 
            Total();
            HBHGQtyCol = Fun_GetCol("叫料数量");
            HHGQtyCol = Fun_GetCol("退料数量");
            HPlanQtyCol = Fun_GetCol("计划发料数量");
            //HQtyCol = Fun_GetCol("订单数量");
            HICMOInterIDCol = Fun_GetCol("HICMOInterID");
            HICMOEntryIDCol = Fun_GetCol("HICMOEntryID");
            HICMOBillNoCol = Fun_GetCol("HICMOBillNo");
            HMaterialIDCol = Fun_GetCol("HMaterialID");
            HSourceInterIDCol = Fun_GetCol("HSouceInterID");
            HSourceEntryIDCol = Fun_GetCol("HSourceEntryID");
            HSourceBillNoCol = Fun_GetCol("HSourceBillNo");
            HWHIDCol = Fun_GetCol("HWHID");
            HSPIDCol = Fun_GetCol("HSPID");
            HProcIDCol = Fun_GetCol("HProcID");
 
 
            // 
        }
        //
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            initGrid();
            Display();
        }
 
        private void tc_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void sx_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }
 
        private void dj_Click(object sender, EventArgs e)
        {
            Sub_ShowBill();
        }
        //显示单据
        private void Sub_ShowBill()
        {
 
            Int64 lngBillKey = 0;
            if (grdMain.CurrentRow == null)
                return;
            lngBillKey = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.CurrentRow.Index].Cells[Fun_GetCol("hmainid")].Value);
            if (lngBillKey == 0)
                return;
            SCM.ClsJIT_CallGoodsBill_CLD oBill = new SCM.ClsJIT_CallGoodsBill_CLD();
            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
            {
                oFrm = new SCM.JIT_CallBill();
                oFrm.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_View;
                oFrm.BillOld = oBill;
                oFrm.ShowDialog();
            }
            else
            {
                MessageBox.Show("单据未找到", "提示");
            }
            oBill = null;
        }
        //
        private Int32 Fun_GetCol(string sCol)
        {
            return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain);
        }
        //
        private void JIT_ComplementGoodList_Load(object sender, EventArgs e)
        {
            oWeb.Url = ClsPub1.WEBSURL;
            //
            //frmCondition = new DBUtility.frmBillQueryCondition_New();
            oSumGrid.ogrdMain = grdMain;  //初始化 new
            oSumGrid.oGridsum = grdSum;
            dtpHBDate.Value = DateTime.Today;
            dtpHEDate.Value = DateTime.Today;
            this.Text = ModCaption;
            lblCaption.Text = ModCaption;
            ps.Checked = true;
            initGrid();
        }
 
        private void grdMain_DblClick(object sender, EventArgs e)
        {
            Sub_ShowBill();
        }
 
        private void timer2_Tick(object sender, EventArgs e)
        {
            //timer2.Enabled = false;
            //frmCondition = new DBUtility.frmBillQueryCondition_New();
 
            //DBUtility.Xt_BaseBillFun.SetCondition(frmCondition, ViewName, this.Name);
            //frmCondition.ShowDialog();
            //if (frmCondition.Tag.ToString() == "OK")
            //{
            //    timer1.Enabled = true;
            //}
        }
 
 
 
 
        private void bclk_Click(object sender, EventArgs e)
        {
            //保存列宽
            DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name);
        }
 
        private void mrlk_Click(object sender, EventArgs e)
        {
            DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name);
        }
        // 
        private void GraphLine()
        {
            //int MainIDCol = Fun_GetCol("hmainid");
            //int SubIDCol = Fun_GetCol("hsubid");
            //string s = frmCondition.cmbHComplete.Text;
            //long n = 0;
            //DBUtility.Xt_BaseBillFun.GraphLine(grdMain, MainIDCol, SubIDCol, s, ref n);
            ////显示
            //lbldj.Text = "查询出 " + n.ToString() + " 张单据";
            //lbljl.Text = "共有 " + grdMain.RowCount.ToString() + " 条记录";
        }
 
        private void GraphicsGrid()
        {
            DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain);
            //DBUtility.Xt_BaseBillFun.GraphicsRowGrid(grdMain, iTopRow, iTopRow + 50, Fun_GetCol("hmainid"));
        }
 
        #region  //打印设置
 
        GridppReport Report;
        //预览
        private void yl_Click(object sender, EventArgs e)
        {
            //选择打印模板
            BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
            oFrm.sBillName = ModName;
            oFrm.sBillModel = ModCaption;
            oFrm.ShowDialog();
            if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
            {
                //
                Sub_SetReport(oFrm.sOpenTmp);
                Report.PrintPreview(true);
            }
        }
 
        private void Sub_SetReport(string sOpenTmp)
        {
            //判断行数
            //
            Report = new GridppReport();
            Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf");  //here .
            Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
        }
 
        private void ReportFetchRecordByDataTable()
        {
            try
            {
                //BLL.Utility.FillRecordToReport(Report, grdMain, grdPrint, Fun_GetCol("HMaterID"));
            }
            catch (Exception e)
            {
                MessageBox.Show("打印失败!:" + e.Message);
            }
        }
 
        #endregion
        //
        private void grdMain_Paint(object sender, PaintEventArgs e)
        {
            GraphicsGrid();
        }
 
        //合计 new
        private void Total()
        {
            if (grdMain.Rows.Count > 0 && grdMain.ColumnCount > 0)
            {
                oSumGrid.SetGridsum();
                oSumGrid.Total();
            }
        }
        //合计 new
        private void grdMain_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
        {
            Total();
        }
        //合计 new
        private void grdMain_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
        {
            Total();
        }
        //导出EXCEL
        private void dc_Click(object sender, EventArgs e)
        {
            DBUtility.Gy_BaseFun.DataToExcel(this.Text, grdMain);
        }
 
        private void cx_Click(object sender, EventArgs e)
        {
            Display();
        }
 
        private void grdMain_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
 
        }
 
        private void grdMain_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
        {
            int i = grdMain.CurrentCell.ColumnIndex;
 
            //string s = DBUtility.ClsPub.isStrNull(grdMain.Columns[i].HeaderText);
            //if (s == "叫料数量" || s == "退料数量")
            //{
            //    e.Cancel = false;
            //}
            //else
            //{
            e.Cancel = true;
            //}
        }
 
        private void cmdHMaterID2_Click(object sender, EventArgs e)
        {
            SCM.ClsCLD_Material_View oMater = new SCM.ClsCLD_Material_View();
            string MaWhere = "";
            MaWhere = " and HUSEORGID = " + ClsPub1.HOrgID;
            if (oMater.RefreshView(MaWhere))
            {
                this.txtHMaterID2.Text = oMater.omodel.HNumber;
                this.txtHMaterID2.Tag = oMater.omodel.HItemID.ToString();
                this.txtHMaterName2.Text = oMater.omodel.HName;
                this.txtHMaterModel2.Text = oMater.omodel.HModel;
            }
            else
            {
                this.txtHMaterID2.Text = "";
                this.txtHMaterID2.Tag = 0;
                this.txtHMaterName2.Text = "";
                this.txtHMaterModel2.Text = "";
            }
        }
 
        private void cmdHMaterID_Click(object sender, EventArgs e)
        {
            SCM.ClsCLD_Material_View oMater = new SCM.ClsCLD_Material_View();
            //if (oMater.RefreshView())
            //{
            //    this.txtHMaterID.Text = oMater.omodel.HNumber;
            //    this.txtHMaterID.Tag = oMater.omodel.HItemID.ToString();
            //    this.txtHMaterName.Text = oMater.omodel.HName;
            //    this.txtHMaterModel.Text = oMater.omodel.HModel;
            //}
            //else
            //{
            //    this.txtHMaterID.Text = "";
            //    this.txtHMaterID.Tag = 0;
            //    this.txtHMaterName.Text = "";
            //    this.txtHMaterModel.Text = "";
            //}
        }
 
        private void cmdHDeptID_Click(object sender, EventArgs e)
        {
            SCM.ClsCLD_Department_View oDept = new SCM.ClsCLD_Department_View();
            string DeWhere = "";
            DeWhere = " and HUSEORGID = " + ClsPub1.HOrgID;
            if (oDept.RefreshView(DeWhere))
            {
                this.txtHDeptID.Text = oDept.omodel.HName;
                this.txtHDeptID.Tag = oDept.omodel.HItemID.ToString();
            }
            else
            {
                this.txtHDeptID.Text = "";
                this.txtHDeptID.Tag = 0;
            }
        }
 
        private void sp_Click(object sender, EventArgs e)
        {
 
            //oFrmBZJ = new JIT_CallGoodsBill();
            //oFrmBZJ.ShowDialog();
        }
        //单据完整性判断          未完成
        private bool Sub_AllowSave()
        {
            //必输项目是否为空
            //if (DBUtility.ClsPub.isLong(txtHDeptID.Tag) == 0)
            //{
            //    MessageBox.Show("生产车间没有选择!", "提示");
            //    return false;
            //}
            //单据号是否重复
            //if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, txtHBillNo.Text.Trim(), BillStatus, BillOld.omodel.HInterID))
            //{
            //    MessageBox.Show("单据号重复!不允许保存!", "提示");
            //    return false;
            //}
            //明细表是否为零行a
            bool b = false;
            //for (int i = 0; i < grdMain.RowCount; i++)
            //{
            //    if (!IsNullRow(i))
            //    {
            //        b = true;
            //        break;
            //    }
            //}
            //if (b == false)
            //{
            //    MessageBox.Show("表体明细行不存在!请录入!", "提示");
            //    return false;
            //}
            return true;
        }
        private void BG_Click(object sender, EventArgs e)
        {
            //WMSWeb.ClsJIT_CallGoodsBillSub_CLD oBillSub = new WMSWeb.ClsJIT_CallGoodsBillSub_CLD();
            ////判断权限
            ////if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
            ////{
            ////    return false;
            ////}
            ////
            //Int32 i;
            //bool bResult;
            ////BillNew = new DAL.ClsJIT_CallGoodsBill_CLD();
            ////失去焦点
            //lblCaption.Focus();
            //if (!Sub_AllowSave())//单据完整性判断
            //{
            //    return;
            //}
            ////赋值ID
            ////if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
            ////    BillNew.omodel.HInterID = BillOld.omodel.HInterID;
            ////else if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_UpdatePrice)
            ////    BillNew.omodel.HInterID = BillOld.omodel.HInterID;
            ////主类赋值
            ////判断会计期是否合理
            //string s = "";
            //int sYear = 0;
            //int sPeriod = 0;
            ////if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(dtpHDate.Value, ref sYear, ref sPeriod, ref s) == false)
            ////{
            ////    MessageBox.Show(s, "提示");
            ////    return false;
            ////}
            ////if (ClsPub.Sub_GetPeriodByDate(ClsPub.isDate(dtpHDate.Value, 0), ref sYear, ref sPeriod))
            ////{
            ////    if (!(sYear * 100 + sPeriod >= ClsPub.CurYear * 100 + ClsPub.CurPeriod))
            ////    {
            ////        MessageBox.Show("您选择的日期的会计期间已结账!请与管理员联系", "提示");
            ////        return false;
            ////    }
            ////}
            ////else
            ////{
            ////    MessageBox.Show("您选择的日期不属于合理的会计期间!请与管理员联系", "提示");
            ////    return false;
            ////}
            ////判断是否启用控制
 
            ////判断是否结案,是否执行计划 
 
            ////
 
            //int CurRows = 0;
            //for ( i = 0; i < grdMain.SelectedRows.Count; i++)
            //{
            //    CurRows = grdMain.SelectedRows[i].Index;
            //    omodel.HYear = sYear;
            //    BillNew.omodel.HPeriod = sPeriod;
            //    //固定赋值=================================
            //    BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim();  //在赋值类前就处理好字符串和数字
            //    BillNew.omodel.HDate = DateTime.Today;
            //    //BillNew.omodel.HRemark = this.txtHRemark.Text.Trim();
            //    //BillNew.omodel.HBacker = "";
            //    //BillNew.omodel.HBackDate = "";
            //    //BillNew.omodel.HCheckDate = DBUtility.ClsPub.isDate(this.txtHCheckDate.Text);
            //    //BillNew.omodel.HChecker = this.txtHChecker.Text;
            //    BillNew.omodel.HMaker = DBUtility.ClsPub.CurUserName;
            //    BillNew.omodel.HMakeDate = DateTime.Today;
            //    BillNew.omodel.HUpDater = "";
            //    BillNew.omodel.HUpDateDate = "";
            //    //BillNew.omodel.HCloseMan = this.txtHCloseMan.Text;
            //    //BillNew.omodel.HCloseDate = DBUtility.ClsPub.isDate(this.txtHCloseDate.Text);
            //    BillNew.omodel.HCloseType = false;
            //    //BillNew.omodel.HDeleteMan = this.txtHDeleteMan.Text;
            //    //BillNew.omodel.HDeleteDate = DBUtility.ClsPub.isDate(this.txtHDeleteDate.Text);
            //    //BillNew.omodel.HMainSourceBillNo = this.txtHBillNo.Text.Trim();
            //    //BillNew.omodel.HMainSourceBillType = "";
            //    //====================================================
            //    //BillNew.omodel.HDeptID = ClsPub.isLong(this.txtHDeptID.Tag.ToString());
            //    //BillNew.omodel.HDeptNumber = ClsPub.isStrNull(this.txtHDeptID.Text);
            //    //BillNew.omodel.HEmpID = ClsPub.isLong(this.txtHEmpID.Tag.ToString());
            //    //BillNew.omodel.HEmpNumber = ClsPub.isStrNull(this.txtHEmpID.Text);
            //    //BillNew.omodel.HGroupID = ClsPub.isLong(this.txtHGroupID.Tag.ToString());  
            //    //明细类赋值
            //    BillNew.DetailColl = new List<SCM.ClsJIT_CallGoodsBillSub_CLD>();
            //    //for (i = 0; i <= grdMain.RowCount - 1; i++)
            //    //{
            //    if (ClsPub.isLong(grdMain.Rows[CurRows].Cells[HMaterialIDCol].Value) != 0)
            //    {
            //        Model.ClsJIT_CallGoodsBillSub_CLD oSub = new Model.ClsJIT_CallGoodsBillSub_CLD();
            //        //固定赋值========================================
            //        oSub.HEntryID = i + 1;
            //        //oSub.HRemark = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HRemarkCol].Value);
            //        oSub.HSourceInterID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HSourceInterIDCol].Value);
            //        oSub.HSourceEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HSourceEntryIDCol].Value);
            //        oSub.HSourceBillType = "88";
            //        oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HSourceBillNoCol].Value);
                    
            //        //oSub.HRelationQty = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HRelationQtyCol].Value);
            //        //oSub.HRelationMoney = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HRelationMoneyCol].Value);
            //        //oSub.HCloseMan = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HCloseManCol].Value);
            //        //oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEntryCloseDateCol].Value);
            //        //oSub.HCloseType = DBUtility.ClsPub.isBool(grdMain.Rows[i].Cells[HCloseTypeCol].Value);
            //        //=============================
            //        oSub.HQty = DBUtility.ClsPub.isDoule(grdMain.Rows[CurRows].Cells[HBHGQtyCol].Value);
            //        if (oSub.HQty <= 0)
            //        {
            //            MessageBox.Show("第" + ClsPub.isStrNull(i + 1) + "行,叫料数量不能为0或者小于0");
            //            return;
            //        }
            //        //oSub.HQtyMust = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HQtyMustCol].Value);
            //        oSub.HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HMaterialIDCol].Value);
            //        oSub.HMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HMaterialNumberCol].Value);
            //        oSub.HModel = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HMaterialModelCol].Value);
            //        //oSub.HDeptID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HDeptIDCol].Value);
            //        //oSub.HDeptName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HDeptNameCol].Value);
            //        oSub.HWHID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HWHIDCol].Value);
            //        //oSub.HWHName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HWHNameCol].Value);
            //        //oSub.HSPName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HSPNameCol].Value);
            //        //oSub.HProcName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcNameCol].Value);
            //        oSub.HSPID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HSPIDCol].Value);
            //        oSub.HProcID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HProcIDCol].Value);
            //        //
            //        oSub.HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HICMOBillNoCol].Value);
            //        oSub.HICMOInterID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HICMOInterIDCol].Value);
            //        oSub.HICMOEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HICMOEntryIDCol].Value);
            //        //oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HSeOrderInterIDCol].Value);
            //        //oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HSeOrderEntryIDCol].Value);
            //        //oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HSeOrderBillNoCol].Value);
            //        oSub.HPlanQty = DBUtility.ClsPub.isDoule(grdMain.Rows[CurRows].Cells[HPlanQtyCol].Value);
            //        BillNew.DetailColl.Add(oSub);
            //        //}
            //        //}
            //    }
            //    //保存完毕后处理
            //    //if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew)
            //    //{
            //    bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
            //    //}
            //    //else
            //    //{
            //    //    bResult = BillNew.ModifyBill(BillNew.omodel.HInterID, ref ClsPub.sExeReturnInfo);
            //    //}
            //    //提示
            //    if (bResult == true)
            //    {
            //        //BillChange = true;
            //        Display();
            //        MessageBox.Show("单据存盘完毕!单据号:" + this.txtHBillNo.Text.Trim(), "提示");
            //        //if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew)
            //        //{
            //        //    BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_View;
            //        BillOld.omodel.HInterID = BillNew.omodel.HInterID;
            //        //    this.Sub_ShowBill();
            //        //}
            //        //else if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
            //        //{
            //        //    BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_View;
            //        //}
            //        //this.Sub_OperStatus();
            //        return;
            //    }
            //    else
            //    {
            //        MessageBox.Show("保存失败!原因:" + ClsPub.sExeReturnInfo, "提示");
            //        return;
            //    }
            //}
        }
 
        private void qxbg_Click(object sender, EventArgs e)
        {
 
            //oFrmJJ = new JIT_CallJinJiBill();
            //oFrmJJ.ShowDialog();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            //oFrmFL = new JIT_CallFLGoodsBill();
            //oFrmFL.ShowDialog();
        }
 
        private void button3_Click(object sender, EventArgs e)
        {
 
        }
    }
}