yangle
2023-03-03 c2a9a460e38c7c196fe98a94e29e6330eac3626f
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace OAM
{
    public partial class frm_MeetingItem : Form
    {
        public string HMeetNumber;
        public string HMeet;
        public bool zt;
        public Int64 HInterID;
        public frm_MeetingItem()
        {
            InitializeComponent();
        }
        public Int64 iInterID = 0;
 
        private void cmdCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void cmdOK_Click(object sender, EventArgs e)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            if (DBUtility.ClsPub.isStrNull(txtHMeet.Text) == "")
            {
                MessageBox.Show("ûÓмÈëÏîÄ¿Ãû³Æ");
                return;
            } 
            if (DBUtility.ClsPub.isStrNull(txtHMeetNumber.Text) == "")
            {
                MessageBox.Show("ûÓмÈëÏîÄ¿´úÂë");
                return;
            }
            if (zt == false)
            {
                //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                oCn.RunProc("update oa_meetingitem set HNumber='" + txtHMeetNumber.Text + "'" +
                                                ",HName='" + txtHMeet.Text + "'" +
                                                " where HItemID=" + HInterID);
                MessageBox.Show("Ð޸ijɹ¦£¡");
                //DBUtility.ClsPub.SaveGridView(grdFJ, this.Name, DBUtility.ClsPub.AppPath);
                this.Close();
                //MessageBox.Show("ÏîÄ¿" + txtHMeet.Text + "ÐÞ¸ÄÍê³É");
            }
            else
            {
                if (iInterID == 0)
                {
                    oCn.RunProc("insert into oa_meetingitem (HNumber,HName,HRemark,HStopflag)  values" +
                        "('" + txtHMeetNumber.Text.Trim() + "','" + txtHMeet.Text.Trim() + "','',0)");
                }
                else
                {
                    oCn.RunProc("Update oa_meetingitem set HNumber='" + txtHMeetNumber.Text.Trim() + "', " +
                        " HName='" + txtHMeet.Text.Trim() + "' where HInterID=" + iInterID.ToString());
                }
                MessageBox.Show("ÐÂÔö³É¹¦£¡");
                txtHMeet.Text = "";
                txtHMeetNumber.Text = "";
                this.Close();
            }
        }
 
        private void frm_MeetingItem_Load(object sender, EventArgs e)
        {
            if (zt == false)
            {
                txtHMeet.Text = HMeet;
                txtHMeetNumber.Text = HMeetNumber;
            }
            else
            {
                txtHMeet.Text = HMeet;
                txtHMeetNumber.Text = HMeetNumber;
            }
        }
    }
}