Example #1
0
 private void btnluu_Click(object sender, EventArgs e)
 {
     using (QLSQADataContext _db = new QLSQADataContext())
     {
         db_SanPham product = new db_SanPham
         {
             TenSP     = txttensp.Text,
             AnhSP     = txtanh.Text,
             SoLuongSP = Convert.ToInt32(txtsoluong.Text),
             GiaSP     = Convert.ToDouble(txtgia.Text),
         };
         _db.db_SanPhams.InsertOnSubmit(product);
         _db.SubmitChanges();
         loadata();
     };
     MessageBox.Show("Thêm thành công", "Thông báo", MessageBoxButtons.OK);
     enableNutLenh(false);
     cleardata();
 }
Example #2
0
 partial void Deletedb_SanPham(db_SanPham instance);
Example #3
0
 partial void Updatedb_SanPham(db_SanPham instance);
Example #4
0
 partial void Insertdb_SanPham(db_SanPham instance);