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 frmsysGG : Form { public frmsysGG() { InitializeComponent(); } private void cmdOK_Click(object sender, EventArgs e) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); oCn.RunProc("Update oa_sysGG set " + "sdesc= '" + txtsdesc.Text.Trim() + "' Where ID = 1", ref DBUtility.ClsPub.sExeReturnInfo); MessageBox.Show("¹«¸æÐ޸ijɹ¦"); this.Close(); } public void Display() { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); try { //²éѯ±í DataSet Ds; Ds = oCn.RunProcReturn("Select * from oa_sysGG Where ID=1", "oa_sysGG"); txtsdesc.Text = Ds.Tables[0].Rows[0]["sdesc"].ToString().Trim(); return; } catch (Exception e) { return; } } private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; Display(); } private void cmdCancel_Click(object sender, EventArgs e) { this.Close(); } } }