雅琪诺MES智能条码管理系统
jhz
2022-06-30 0d3b2bd4edaa7385e4ff96370c877be237af054b
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Pub_Class;
 
namespace SCM
{
    public partial class Sc_WaitingForCutting_List : Form
    {
        public Sc_WaitingForCutting_List()
        {
            InitializeComponent();
        }
        public string ViewName = "h_p_Sc_PackUnionBillList";
        public string ModCaption = "检验/裁切列表";
        public const string ModRightName = "Sc_WaitingForCutting_List";
        public string HSourceBillType = "";
        public string HBillType = "3710";//类型,根据此字段选择裁切还是分切
        SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
 
        private void initGrid()
        {
            ClsPub1.initGridList(grdMain, this.Name);
            grdMain.RowTemplate.Height = 60;//行高
            grdMain.ColumnHeadersHeight = 60;//设置表头行高
            grdMain.RowHeadersWidth = 260;
            grdMain.RowsDefaultCellStyle.Font = new Font("宋体", 22);
            grdMain.ReadOnly = true;
        }
 
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            initGrid();
            Display();
        }
 
        private void Sc_WaitingForCutting_List_Load(object sender, EventArgs e)
        {
            //设置动态URL
            oWeb.Url = SCM.ClsPub1.WEBSURL;
            this.Text = ModCaption;
        }
 
 
        private void timer2_Tick(object sender, EventArgs e)
        {
            timer2.Enabled = false;
        }
 
        private void grdMain_Paint(object sender, PaintEventArgs e)
        {
            GraphicsGrid();
        }
 
        private void GraphicsGrid()
        {
            //画底线
            DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain);
        }
 
        private Int32 Fun_GetCol(string sCol)
        {
            return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain);
        }
 
        //保存列宽
        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 Display()
        {
 
            DataSet DS = oWeb.getDataSetBySQL("exec " + ViewName + "  '" + HBillType + "'", ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
            if (DS==null ||  DS.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("没有找到相关源单信息!" + DBUtility.ClsPub.sExeReturnInfo);
                return;
            }
            grdMain.DataSource = DS.Tables[0].DefaultView;//加载数据
 
 
            DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name);//获取之前保存的列宽
        }
 
 
        //退出按钮
        private void btnTC_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
 
        
    }
}