public static bool ThemGia(GiaDTO g) { string sql = string.Format("set dateformat DMY insert into Gia values (convert(varchar(10),'{0}', 103), {1}, {2})", g.NgayADGia, g.MaTD, g.Gia); bool kq = SqlDataAccessHelper.ExecuteNonQuery(sql); return(kq); }
public static bool CapNhatGia(GiaDTO g) { string sql = string.Format("set dateformat DMY update Gia set NgayADGia = '{0}', Gia = {1} where MaThucDon = {2}", g.NgayADGia, g.Gia, g.MaTD); bool kq = SqlDataAccessHelper.ExecuteNonQuery(sql); return(kq); }
public DateTime NgayADGiaGet([PexAssumeUnderTest] GiaDTO target) { DateTime result = target.NgayADGia; return(result); // TODO: add assertions to method GiaDTOTest.NgayADGiaGet(GiaDTO) }
public void NgayADGiaGet934() { DateTime dt; GiaDTO s0 = new GiaDTO(default(DateTime), 0, 0); dt = this.NgayADGiaGet(s0); Assert.AreEqual <int>(1, dt.Day); Assert.AreEqual <DayOfWeek>(DayOfWeek.Monday, dt.DayOfWeek); Assert.AreEqual <int>(1, dt.DayOfYear); Assert.AreEqual <int>(0, dt.Hour); Assert.AreEqual <DateTimeKind>(DateTimeKind.Unspecified, dt.Kind); Assert.AreEqual <int>(0, dt.Millisecond); Assert.AreEqual <int>(0, dt.Minute); Assert.AreEqual <int>(1, dt.Month); Assert.AreEqual <int>(0, dt.Second); Assert.AreEqual <int>(1, dt.Year); Assert.IsNotNull((object)s0); Assert.AreEqual <int>(1, s0.NgayADGia.Day); Assert.AreEqual <DayOfWeek>(DayOfWeek.Monday, s0.NgayADGia.DayOfWeek); Assert.AreEqual <int>(1, s0.NgayADGia.DayOfYear); Assert.AreEqual <int>(0, s0.NgayADGia.Hour); Assert.AreEqual <DateTimeKind>(DateTimeKind.Unspecified, s0.NgayADGia.Kind); Assert.AreEqual <int>(0, s0.NgayADGia.Millisecond); Assert.AreEqual <int>(0, s0.NgayADGia.Minute); Assert.AreEqual <int>(1, s0.NgayADGia.Month); Assert.AreEqual <int>(0, s0.NgayADGia.Second); Assert.AreEqual <int>(1, s0.NgayADGia.Year); Assert.AreEqual <int>(0, s0.MaTD); Assert.AreEqual <double>(0, s0.Gia); }
public int MaTDGet([PexAssumeUnderTest] GiaDTO target) { int result = target.MaTD; return(result); // TODO: add assertions to method GiaDTOTest.MaTDGet(GiaDTO) }
public double GiaGet([PexAssumeUnderTest] GiaDTO target) { double result = target.Gia; return(result); // TODO: add assertions to method GiaDTOTest.GiaGet(GiaDTO) }
public GiaDTO Constructor02(GiaDTO gia) { GiaDTO target = new GiaDTO(gia); return(target); // TODO: add assertions to method GiaDTOTest.Constructor02(GiaDTO) }
public GiaDTO Constructor() { GiaDTO target = new GiaDTO(); return(target); // TODO: add assertions to method GiaDTOTest.Constructor() }
public GiaDTO Constructor01( DateTime ngayAD, int maTD, double gia ) { GiaDTO target = new GiaDTO(ngayAD, maTD, gia); return(target); // TODO: add assertions to method GiaDTOTest.Constructor01(DateTime, Int32, Double) }
public void Constructor02533() { GiaDTO giaDTO; GiaDTO s0 = new GiaDTO(default(DateTime), 0, 0); giaDTO = this.Constructor02(s0); Assert.IsNotNull((object)giaDTO); Assert.AreEqual <int>(1, giaDTO.NgayADGia.Day); Assert.AreEqual <DayOfWeek>(DayOfWeek.Monday, giaDTO.NgayADGia.DayOfWeek); Assert.AreEqual <int>(1, giaDTO.NgayADGia.DayOfYear); Assert.AreEqual <int>(0, giaDTO.NgayADGia.Hour); Assert.AreEqual <DateTimeKind>(DateTimeKind.Unspecified, giaDTO.NgayADGia.Kind); Assert.AreEqual <int>(0, giaDTO.NgayADGia.Millisecond); Assert.AreEqual <int>(0, giaDTO.NgayADGia.Minute); Assert.AreEqual <int>(1, giaDTO.NgayADGia.Month); Assert.AreEqual <int>(0, giaDTO.NgayADGia.Second); Assert.AreEqual <int>(1, giaDTO.NgayADGia.Year); Assert.AreEqual <int>(0, giaDTO.MaTD); Assert.AreEqual <double>(0, giaDTO.Gia); }
public static bool CapNhatGia(GiaDTO g) { bool kq = GiaDAO.CapNhatGia(g); return(kq); }
public static bool ThemGia(GiaDTO g) { bool kq = GiaDAO.ThemGia(g); return(kq); }
public void NgayADGiaSet([PexAssumeUnderTest] GiaDTO target, DateTime value) { target.NgayADGia = value; // TODO: add assertions to method GiaDTOTest.NgayADGiaSet(GiaDTO, DateTime) }
public void MaTDSet([PexAssumeUnderTest] GiaDTO target, int value) { target.MaTD = value; // TODO: add assertions to method GiaDTOTest.MaTDSet(GiaDTO, Int32) }
public void GiaSet([PexAssumeUnderTest] GiaDTO target, double value) { target.Gia = value; // TODO: add assertions to method GiaDTOTest.GiaSet(GiaDTO, Double) }