Exemple #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (txtlhid.Text == "")
            {
                MessageBox.Show("请填写料号ID");
                txtlhid.Focus();
                return;
            }
            DataList list = new DataList();

            list.lhid  = txtlhid.Text;
            list.keh   = txtkh.Text;
            list.lhlx  = txtlhlx.Text;
            list.lhdm  = txtlhdm.Text;
            list.cpmc  = txtcpmc.Text;
            list.guig  = txtgg.Text;
            list.cwlx  = txtcwlx.Text;
            list.miaos = txtms.Text;
            list.ytms  = txtytms.Text;
            list.paix  = txtpx.Text;
            if (checkBox1.Checked)
            {
                list.flag = "Y";
            }
            else
            {
                list.flag = "N";
            }
            if (crud.xgwlbm(list) == "success")
            {
                MessageBox.Show(txtlhid.Text + "修改成功!");
                databind();
            }
        }