public bool UpdateData(ChiTietNhapXeObj CTNhapxObj)
        {
            cmd.CommandText = string.Format("UPDATE tblChiTietNhap SET MACTN = '{0}', MANHAP = '{1}', MATTXE = '{2}', DONGIANHAP = {3}, SOLUONG = {4}, DONVITINH = N'{5}' WHERE (MACTN = '{0}')", CTNhapxObj.MaCTN, CTNhapxObj.MaNhap, CTNhapxObj.MaThongTinXe, CTNhapxObj.DonGia, CTNhapxObj.SoLuong, CTNhapxObj.DonViTinh);
            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(ChiTietNhapXeObj CTNhapxObj)
        {
            cmd.CommandText = string.Format("INSERT INTO tblChiTietNhap (MACTN, MANHAP, MATTXE, DONGIANHAP, SOLUONG, DONVITINH) VALUES ('{0}', '{1}', '{2}', {3}, {4}, N'{5}')", CTNhapxObj.MaCTN, CTNhapxObj.MaNhap, CTNhapxObj.MaThongTinXe, CTNhapxObj.DonGia, CTNhapxObj.SoLuong, CTNhapxObj.DonViTinh);
            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(ChiTietNhapXeObj CTNhapObj)
 {
     return(CTNhapMod.UpdateData(CTNhapObj));
 }
 public bool addData(ChiTietNhapXeObj CTNhapObj)
 {
     return(CTNhapMod.AddData(CTNhapObj));
 }