首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴王一楠的代码贴全部
private void btnAdd_Click(object sender, EventArgs e)
        {

            //校验
            if ((txtprice.Text == "") || (txtquantity.Text == "")
                 || (txtdiscount.Text == "") || (txtgid.Text == "")
                 || (txtname.Text == "") || (txtdate.Text == "") || (txtcolor.Text == "") || (txtsize.Text == "")
                || (txtshuxing.Text == "") || (txtbrand.Text == ""))
            {
                MessageBox.Show("不能为空。");
                return;
            }
......................
阅读全部 | 2016年6月8日 13:40
private void btndelete_Click(object sender, EventArgs e)
        {
            int txtnumber = Convert.ToInt32(dataGridView1["Sid", dataGridView1.CurrentCell.RowIndex].Value);
            string sql = "delete from xiaoshoubiao where Sid=" + txtnumber.ToString();
            try
            {
                OleDbCommand myconn = new OleDbCommand(sql, myOleConn);
                myconn.ExecuteNonQuery();
                RefreshDG();
            }
            catch (Exception ea)
            {
......................
阅读全部 | 2016年6月8日 10:51
1
王一楠