public void NhapHang(HangHoa h)
 {
     List<SqlParameter> list = new List<SqlParameter>();
     list.Add(new SqlParameter("@tenhanghoa", h.TenHangHoa));
     list.Add(new SqlParameter("@soluong", h.SoLuong));
     list.Add(new SqlParameter("@mahanghoa", h.MaHangHoa));
     db.Execute("ThemHangHoa", list.ToArray());
 }
 HangHoa GetHangHoFromView()
 {
     HangHoa h = new HangHoa();
     h.TenHangHoa = txttenmh.Text;
     h.SoLuong = int.Parse(txtsoluong.Text);
     h.MaHangHoa = txttenmh.Text;
     return h;
 }
 HangHoa GetHangHoFromView()
 {
     HangHoa h = new HangHoa();
     h.TenHangHoa = txtTenHH.Text;
     h.SoLuong = int.Parse(txtSL.Text);
     h.MaHangHoa = txtMaHH.Text;
     h.Gia = int.Parse(txtThanhTien.Text);
     return h;
 }