예제 #1
0
 /// <summary>
 /// Update Thông tin khoa
 /// </summary>
 /// <returns>true</returns>
 private static void UpdateKhoa(Khoa item)
 {
     try
     {
         Conn.ExcuteQuerySql("UPDATE KHOA set TenKhoa = N'" + item.TenKhoa +
                             "' where ID = " + item.ID + "");
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
예제 #2
0
 /// <summary>
 /// Thêm 1 khoa quản lý
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public static bool ThemKhoa(Khoa item)
 {
     try
     {
         Conn.ExcuteQuerySql("INSERT INTO KHOA(TenKhoa) values(N'" + item.TenKhoa + "')");
         return true;
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
         return false;
     }
 }