Example #1
0
 /// <summary>
 /// Sửa thông tin 1 kỳ thi
 /// </summary>
 /// <returns>true</returns>
 public static void UpdateTrangThaiKt(Kythi item)
 {
     try
     {
         Conn.ExcuteQuerySql("update KYTHI set TrangThai = '"+item.TrangThai+"' WHERE ID = " + item.ID + "");
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
Example #2
0
 /// <summary>
 /// Sửa thông tin 1 kỳ thi
 /// </summary>
 /// <returns>true</returns>
 private static void UpdateKyThi(Kythi item)
 {
     try
     {
         Conn.ExcuteQuerySql("update KYTHI set TenKT = N'" + item.TenKT + "',NgayThi = '" +
                             item.NgayThi + "',TGLamBai = N'" + item.TGLamBai + "',TGBatDau = N'" +
                             item.TGBatDau + "' ,TGKetThuc = N'" +
                             item.TGKetThuc + "', GhiChu = N'"+item.GhiChu+"' WHERE ID = " + item.ID + "");
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
Example #3
0
 /// <summary>
 /// Thêm 1 kỳ thi
 /// </summary>
 /// <returns></returns>
 public static bool ThemKyThi(Kythi item)
 {
     try
     {
         Conn.ExcuteQuerySql("insert into KYTHI(MaKT,TenKT,NgayThi,TGLamBai,TGBatDau,TGKetThuc,GhiChu,TrangThai) values(N'" +
                     item.MaKT + "',N'" + item.TenKT + "','" + item.NgayThi + "',N'" +
                     item.TGLamBai + "',N'" + item.TGBatDau + "',N'" + item.TGKetThuc + "',N'"+item.GhiChu+"',1)");
         return true;
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
         return false;
     }
 }