丰州同步程序(已移交给金睿)
ch
2021-09-14 8b2ca4dfd8a581378ce2759ddd7c3420cc42d151
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace EDI
{
    public partial class FrmServerSub : Form
    {
        public FrmServerSub()
        {
            InitializeComponent();
        }
        public string HType;
        public long HInterID;
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
 
 
        private void initGrid()
        {
            DBUtility.Xt_BaseBillFun.initGridList(grdMain, this.Name + "grdMain"); 
        }
        private void Display()
        {
            DataSet Ds;
            if (HType == "830")
            {
                Ds = oCn.RunProcReturn("select * from h_v_ZOCT_Detail830 where EnvelopRID=" + HInterID, "h_v_ZOCT_Detail830");
                if (Ds == null)
                {
                    return;
                }
                grdMain.DataSource = Ds.Tables[0];
            }
            else if (HType == "856")
            {
                Ds = oCn.RunProcReturn("select * from h_v_ZOCT_Detail856 where EnvelopSID=" + HInterID, "h_v_ZOCT_Detail830");
                if (Ds == null)
                {
                    return;
                }
                grdMain.DataSource = Ds.Tables[0];
            }
            else if (HType == "862")
            {
                Ds = oCn.RunProcReturn("select * from h_v_ZOCT_Detail862 where EnvelopRID=" + HInterID, "h_v_ZOCT_Detail830");
                if (Ds == null)
                {
                    return;
                }
                grdMain.DataSource = Ds.Tables[0];
            }
            else if (HType == "Err")
            { }
            else if (HType == "Invoice")
            { }
        }
 
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            Display();
        }
 
        private void FrmServerSub_Load(object sender, EventArgs e)
        {
            initGrid();
        }
 
        private void tc_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void fq_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }
    }
}