コード例 #1
0
        //添加
        private void button1_Click(object sender, EventArgs e)
        {
            SuperMarketDataClassesDataContext db = new SuperMarketDataClassesDataContext();
            SISM_commodityclass scc = new SISM_commodityclass();

            if (textBox4.Text != "")
            {
                scc.SId   = int.Parse(textBox4.Text);
                scc.SName = textBox2.Text;
                scc.SNote = textBox3.Text;
                db.SISM_commodityclass.InsertOnSubmit(scc);
                try
                {
                    db.SubmitChanges();
                    dataGridView1.DataSource = db.SISM_commodityclass;
                    MessageBox.Show("添加成功!");
                    clear();
                }
                catch (Exception ex)
                {
                }
            }
            else
            {
                MessageBox.Show("请输入添加信息!");
            }
        }
コード例 #2
0
 partial void UpdateSISM_commodityclass(SISM_commodityclass instance);
コード例 #3
0
 partial void DeleteSISM_commodityclass(SISM_commodityclass instance);
コード例 #4
0
 partial void InsertSISM_commodityclass(SISM_commodityclass instance);