Esempio n. 1
0
 /// <summary>
 /// Sửa thông tin 1 phòng thi
 /// </summary>
 /// <returns>true</returns>
 private static void UpdatePhongThi(PhongThi item)
 {
     try
     {
         Conn.ExcuteQuerySql("update PHONGTHI set TenPhong = N'" +
                             item.TenPhong + "',SucChua = " + item.SucChua + ",GhiChu = N'" +
                             item.GhiChu + "' WHERE ID = " + item.ID + "");
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Thêm 1 phòng thi
 /// </summary>
 /// <returns></returns>
 public static bool ThemPhongThi(PhongThi item)
 {
     try
     {
         Conn.ExcuteQuerySql("insert into PHONGTHI(TenPhong,SucChua,GhiChu) values(N'" +
                     item.TenPhong + "'," + item.SucChua + ",N'" + item.GhiChu + "')");
         return true;
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
         return false;
     }
 }