wtt
2 天以前 770c739aeadfd1025bd6b64aa6790201b0b1047d
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace APSM
{
    public partial class Sc_ICMOSortBillListDlg : Form
    {
        public Sc_ICMOSortBillListDlg()
        {
            InitializeComponent();
        }
 
        public long HInterID = 0;
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
 
        private void cmdCancel_Click(object sender, EventArgs e)
        {
            this.Visible = false;
        }
 
        private void cmdOK_Click(object sender, EventArgs e)
        {
            if (SubSave())
            {
                MessageBox.Show("Ð޸ijɹ¦£¡", "Ìáʾ");
            }
            this.Visible = false;
        }
 
        private bool SubSave()
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HRemark='" + txtHRemark.Text.Trim() + "' where HInterid=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                MessageBox.Show("ÐÞ¸Äʧ°Ü£¡Ô­Òò£º" + e.Message.ToString(), "Ìáʾ");
                oCn.RollBack();
                return false;
            }
        }
 
        private void Sc_ICMOSortBillListDlg_Load(object sender, EventArgs e)
        {
            SubShow();
        }
 
        private void SubShow()
        {
            try
            {
                //²éѯÖ÷±í
                DataSet Ds;
                Ds = oCn.RunProcReturn("Select * from Sc_ICMOBillStatus_Tmp Where HInterid=" + HInterID.ToString(), "Sc_ICMOBillStatus_Tmp");
                if (Ds.Tables[0].Rows.Count == 0)
                {
                    MessageBox.Show("µ¥¾ÝδÕÒµ½£¡", "Ìáʾ");
                    return;
                }
                txtHRemark.Text = Ds.Tables[0].Rows[0]["HRemark"].ToString();
            }
            catch (Exception e)
            {
                MessageBox.Show("ÐÞ¸Äʧ°Ü£¡Ô­Òò£º" + e.Message.ToString(), "Ìáʾ");
                return;
            }
        }
    }
}