public bool UpdateData(ChiTietHoaDonBanPhuTungObj chiTietHDBanPTObj)
        {
            cmd.CommandText = string.Format("UPDATE tblChiTietHDBanPT SET MACTHDBANPT = '{0}', MAHDBANPT = '{1}', MAPT = '{2}', SOLUONG = {3} WHERE (MACTHDBANPT = '{4}')", chiTietHDBanPTObj.MaChiTietHoaDonBanPhuTung, chiTietHDBanPTObj.MaHoaDonBanPhuTung, chiTietHDBanPTObj.MaPhuTung, chiTietHDBanPTObj.SoLuong);
            cmd.Connection  = con.Connection;

            try
            {
                con.openCon();
                cmd.ExecuteNonQuery();
                con.closeCon();
                return(true);
            }
            catch (Exception ex)
            {
                string mes = ex.Message;
                cmd.Dispose();
                con.closeCon();
            }

            return(false);
        }
        public bool AddData(ChiTietHoaDonBanPhuTungObj chiTietHDBanPTObj)
        {
            cmd.CommandText = string.Format("INSERT INTO tblChiTietHDBanPT (MACTHDBANPT, MAHDBANPT, MAPT, SOLUONG) VALUES ('{0}', '{1}', '{2}', {3})", chiTietHDBanPTObj.MaChiTietHoaDonBanPhuTung, chiTietHDBanPTObj.MaHoaDonBanPhuTung, chiTietHDBanPTObj.MaPhuTung, chiTietHDBanPTObj.SoLuong);
            cmd.CommandType = CommandType.Text;
            cmd.Connection  = con.Connection;

            try
            {
                con.openCon();
                cmd.ExecuteNonQuery();
                con.closeCon();
                return(true);
            }
            catch (Exception ex)
            {
                string mes = ex.Message;
                cmd.Dispose();
                con.closeCon();
            }

            return(false);
        }
 public bool updateData(ChiTietHoaDonBanPhuTungObj chiTietHDBanPTObj)
 {
     return(chiTietHDbanPTMod.UpdateData(chiTietHDBanPTObj));
 }
 public bool addData(ChiTietHoaDonBanPhuTungObj chiTietHDBanPTObj)
 {
     return(chiTietHDbanPTMod.AddData(chiTietHDBanPTObj));
 }