using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL;
using MODEL;
namespace baojinMIS
{
public partial class formmaf : Form
{
public formmaf()
{
InitializeComponent();
}
private void formadd_FormClosed(object sender, FormClosedEventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void button1_Click(object sender, EventArgs e)
{
string sno = textBoxsno.Text.Trim();
string sname = textBoxsname.Text.Trim();
string sex = textBoxsex.Text.Trim();
string sbirthday = textBoxsbirthday.Text.Trim();
new BaojinDAO().modify( sno, sname,sex,sbirthday);//此行有错
}
private void formmaf_Load(object sender, EventArgs e)
{
string sno = textBoxsno.Text.Trim();
string sname = textBoxsname.Text.Trim();
string sex = textBoxsex.Text.Trim();
string sbirthday = textBoxsbirthday.Text.Trim();
BaojinInformation baojin = new BaojinInformation(sno, sname, sex, sbirthday);
DAL.BaojinDAO.modify(baojin);
MessageBox.Show("修改成功!", "提示");
textBoxsno.Text = "";
textBoxsname.Text = "";
textBoxsex.Text = "";
textBoxsbirthday.Text = "";
textBoxsno.Focus();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void textBoxsno_TextChanged(object sender, EventArgs e)
{
}
private void textBoxsname_TextChanged(object sender, EventArgs e)
{
}
private void textBoxsex_TextChanged(object sender, EventArgs e)
{
}
private void textBoxsbirthday_TextChanged(object sender, EventArgs e)
{
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL;
using MODEL;
namespace baojinMIS
{
public partial class formmaf : Form
{
public formmaf()
{
InitializeComponent();
}
private void formadd_FormClosed(object sender, FormClosedEventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void button1_Click(object sender, EventArgs e)
{
string sno = textBoxsno.Text.Trim();
string sname = textBoxsname.Text.Trim();
string sex = textBoxsex.Text.Trim();
string sbirthday = textBoxsbirthday.Text.Trim();
new BaojinDAO().modify( sno, sname,sex,sbirthday);//此行有错
}
private void formmaf_Load(object sender, EventArgs e)
{
string sno = textBoxsno.Text.Trim();
string sname = textBoxsname.Text.Trim();
string sex = textBoxsex.Text.Trim();
string sbirthday = textBoxsbirthday.Text.Trim();
BaojinInformation baojin = new BaojinInformation(sno, sname, sex, sbirthday);
DAL.BaojinDAO.modify(baojin);
MessageBox.Show("修改成功!", "提示");
textBoxsno.Text = "";
textBoxsname.Text = "";
textBoxsex.Text = "";
textBoxsbirthday.Text = "";
textBoxsno.Focus();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void textBoxsno_TextChanged(object sender, EventArgs e)
{
}
private void textBoxsname_TextChanged(object sender, EventArgs e)
{
}
private void textBoxsex_TextChanged(object sender, EventArgs e)
{
}
private void textBoxsbirthday_TextChanged(object sender, EventArgs e)
{
}
}
}