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; } } } }